Shooting a grenade

Try to adjust the gravity, that should do the trick. =S

Here’s a code example.


int curr_x, curr_y;
int target_x, target_y;

// Assuming that velocity is positive
int h_distance, velocity;

int frames;

int currframe = 0;

boolean calculated = false;
// the update method
public void update(){
    if (!calculated){
        h_distance = Math.abs(target_x - curr_x);
        frames = h_distance/velocity;
        calculated = true;
    }
    currframe++;
    curr_x += velocity;
    if (currframe<(frames/2)){
        // Move up
        curr_y -= 2; // Adjust it to suit your needs
    } else {
        // Move down
        curr_y += 2;
    }
}

This had worked for me.