196
Ask a Question / Re: Ballistics / Curves
« on: June 19, 2012, 01:47:18 am »
Oh, I'm sorry, I forgot that velocity takes degrees, not coordinates. In such case you would have to calculate angle (using atan2), something like this:
meaning - it takes distance in x and distance in y and decrement y by the absolute value of distance in x.
This may indeed need more time to calculate. How do you calculate bullets motion currently (I mean without the curve)?
Code: [Select]
atan2[([y of enemy] - [absolute value of ([x of self] - [x of enemy]) - [y of self]) ([x of enemy] - [x of enemy])]
meaning - it takes distance in x and distance in y and decrement y by the absolute value of distance in x.
This may indeed need more time to calculate. How do you calculate bullets motion currently (I mean without the curve)?