Hay I have a simple script which makes my sprite jump.
I have this line being fired every frame
this->sprite.Move( (this->deltaTime * this->xVelocity), (this->jumpSpeed * this->deltaTime) * this->yVelocity);
And when my jump button is pressed this code gets run
this->yVelocity = -this->weight;
if (this->sprite.GetPosition().y < apex) {
this->isJumping = false;
}
This works well. I hit jump, my character jumps, reaches a peak then drops down. However, my movement is more like an upside down V rather than an arch. How would I accomplish a more "real" jump effect?