- Home /
Lookat function moves object backwards
I have an object (a "slendermen" type baddy) that does follow the player and freeze when rendered. My problem is that I have a lookat function that is always on, regardless of rendering, and for some reason in push my baddy away from the player (in the opposite direction its facing)
The code in the lookat script is essentially transform.root.transform.LookAt(player.transform.position); where "player" has been assigned in the editor.
Comment
Are you moving the enemy with a character controller? LookAt does not move the object, but perhaps it is interfering with your movement script?
Your answer
Follow this Question
Related Questions
slowly rotate a object *need quick fix* 0 Answers
transform.LookAt boundaries 1 Answer
LookAt To Only Rotate on Y Axis 2 Answers