Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Simple 2d Physics

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1   Guests   

0
Like
Likes
Like

Posted 30 July 1999 - 05:19 PM

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


#2 Anonymous Poster_Anonymous Poster_*   Guests   

Likes

Posted 30 July 1999 - 05:19 PM

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





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.