This question was
closed Jun 25, 2020 at 08:57 PM by
TotallyNotTim for the following reason:
Solved on my own
Question by
TotallyNotTim · Jun 25, 2020 at 04:12 AM ·
rotation3d
How to lock X rotation on 3D object?
I'm working on an AI that looks at the player at a certain distance. This almost works, as the AI will change its Y rotation to look at the player. However, the X rotation will also change depending on how high or low the player is, which I DON'T want. How do I lock the X rotation with this script?
transform.LookAt(player.transform.position);
Comment