Jump to content
  • Advertisement

Archived

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

Guest

Simple 2d Physics

This topic is 6875 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

Guest
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."


http://www.crosswinds.net/~milenko
http://www.crosswinds.net/~pirotech

Share this post


Link to post
Share on other sites
Advertisement
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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!