Sign in to follow this  
Andre Rogers

Projectile Motion

Recommended Posts



Can somebody please tell me how I can simulate a trajectory or projectile motion. I am building a game where a character is moving and as it gains momentum and moves up a slope, I want the character to launch it self.


Any help would be greatly appreciated.


Thank you.



Share this post

Link to post
Share on other sites
Look up `Euler integration'. You model your character/projectile/whatever as a point mass. In each frame, compute the sum of all the forces, compute acceleration (a vector) as force divided by mass, and then do this:
  velocity += acceleration * delta_time;
  position += velocity * delta_time;
If you want to do the same thing for rotations, the situation is similar, but make sure you understand this part first.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this