dimanche 28 septembre 2014

Smoothly rotate turret and retain accuracy


Vote count:

0




I have a turret that predicts a moving targets position and fires a projectile to intersect.


The problem is I want to smooth out the movement of the turret.


If I lerp the turrets movement, it means the closer the turret gets the smaller steps it takes, lowering the rotation speed and the accuracy falls away.


If I used fixed steps it's a somewhat better result but I lose the pinpoint accuracy where the angle can't get any closer than the size of the fixed step.


Is there a better way to do something like this?


The desired end result would be smooth movement over anything, with the turret able to accelerate or decelerate from a top speed as it needs to reach the correct angle, with some added inertia when suddenly having to rotate the other way.


Hopefully I can work some of it out eventually but any tips appreciated.



asked 17 secs ago







Smoothly rotate turret and retain accuracy

Aucun commentaire:

Enregistrer un commentaire