i’m trying to build a catapult that have constant projectile’s velocity. it should get location of enemy and controls angle of YAW and PITCH, then shoot projectile to location. unfortunately i cant do the math and don’t know the best & optimize way for implanting this for mobile platforms.
so, what should I do, to make this work?
I will appreciate your help with this situation
Well, you need a little bit of math.
Basically, you have 2 motions, vertical and horizontal.
Vertical is always 9.81 m/s² in -Z direction. (1 Unreal Unit is 0.01 meter)
With the location of your catapult and your enemy you can get the distance between them. Because your vertical velocity is constant, you can set up a simple equiation solving.
I know thats not the complete answer but you should use this as a base
Thanks. i know this so far. but need more specific solution. setting up the equation is my problem…