- Home /
Question by
tim_unity262 · Jul 06, 2020 at 10:06 AM ·
lookat2d rotation
Change the face of lookat 2d
i have a 2d Character (its a top down character), i want to lookat() the mouse, but if i do:
Vector3 mousePosition = Input.mousePosition;
mousePosition = Camera.main.ScreenToWorldPoint(mousePosition);
mousePosition.z = 0;
and then: transform.LookAt(mousePosition);
it gets rotated over the x and y axis, bt i want to rotate it over the z axis. could any1 help me out!?
ps im sorry for my bad english i had to make this in a rush before school.
Thanks, Megarcher
Comment
Your answer
Follow this Question
Related Questions
Problem with Quaternion.LookRotation() 1 Answer
How to define the "front" of an object? 0 Answers
2D tranform.lookAt Problem 1 Answer
Looking at target in 2D 1 Answer
2D look at upside down. 2 Answers