- Home /
Duplicate Question
How can i follow an object by 1-axis-rotation?
I have a Turret, that should follow my players position by rotating around the y-axis only. If i use the "look at" the turret rotates around all axis. How can i prevent it from rotating around X And Z Axis?
PLEASE RE$$anonymous$$OVE QUESTION DUPLICATE QUESTION This has been asked a million times before... search before you question.
Turret questions have been answered a number of times. The idea is to bring the point down to the level of the turret before doing the LookAt(). Here is one post with some code:
http://answers.unity3d.com/questions/388185/make-the-turret-automatically-rotate-to-look-at-wh.html
Follow this Question
Related Questions
Rotation for 180 degrees of character 1 Answer
Object isnt rotating when moving towards an object 1 Answer
Rotation with multiple objects 1 Answer
How to prevent Z axis rotation ? 1 Answer