Tank Turret ( Help needed )

Hi, I am currently working on a tank game ( just for fun ) and there is no serius work about it. I have had some issues trying to make the turret rotate towards the mouse location. The camera rotates and the there is a sphere ( invisible with no colliders or anything ) in front of the turret. I have managed to make the turret rotate twards it with the LookAt() funcion and i got not so bad results. but what i was expecting is the turret to rotate towards where the mouse is at.

if you play World of Tanks you will understand what I mean.

tank is many parts, Tracks, Hull , Turret , Gun_Barrel. the movement is no issue, used AddForce() and for rotation i used the good old transform.Rotate() :slight_smile: .

Thanks in advance :slight_smile:

I’m not understanding what your question is? Perhaps you could rephrase your post as a question.

How do you make an object rotate at a stable speed ? LookAt slows down before it reaches the target.

all i want to do is make it damp at a stable speed.

i might be creative and modify or add to the lookat function but it seems to consume too much time.

here is how it will go ( i hope )

if the the object is not looking at the target ( rotate the object X Degrees )

dont worry i worked the math but cant seem to get this to work