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() .
Thanks in advance