Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Simple 2d Physics

This topic is 7021 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok I'm trying to make a bullet move throught the air.
basicly I've got the following data to start with

SX = Starting X
SY = Starting Y
DX = Destination X sorta
DY = Destination Y sorta
V = Vilocity Along Line

and what I need is

XV = X vilocity
YV = Y vilocity

any Ideas?

Great Milenko

Words Of Wisdom:
"Never Stick A Pretzel In Your Butt It Might Break Off In There."


Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Vx = Xd - Xs / t
Vy = Yd - Ys / t

t is total time. If t is not known, normalize the vector V, i.e.,

Vx = Xd - Xs
Vy = Yd - Ys
|V| = sqrt((Vx ** 2) + (Vy ** 2))
Vx /= |V|
Vy /= |V

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!