How to model projectile motion?

Hi,
I need to get projectiles velocity, when i know: projectiles velocity magnitude, cannon pos and target pos, but i have no idea, how to do it, only thing i know, is that i need to make X/Z motion lower and Y motion bigger, when the distance is bigger. (if i am shoting under 45°)

1 Like

You might want to look into Bezier Curves

I used them when scripting throwing knives

3 Likes

You might want to take a look at this:

6 Likes

I looked on it before, but from what i saw, it is about creating path from start, end and time.

[SOLUTION]


v is velocity (magnitude of what velocity it will have), g is gravity (basic gravity is 196.2 studs per second) and x and y are horizontal (x) and vertical (y) relative pos of target
sry that it is black on black, i tried to add html tag, but devforum ignored it, so i added quote

7 Likes