- Home /
Locking movement to 2d
I'm making a 2d game in x + y. I need to completely lock out z- movement - stop it from occuring completely. How do I do this?
Comment
Best Answer
Answer by Persona · Mar 23, 2011 at 08:29 PM
transform.position.z = 0;
Attach that in the Update Function of your script.
Your answer
Follow this Question
Related Questions
How to move 2D character from one place to another by "movement" and not "teleporting"? 2 Answers
Sprite with non-constant jitter during constant velocity movement. 2 Answers
Player movement boudaries in 2D 1 Answer
Top down movement and rotation 2 Answers
Uneven speed in 2d movement script 2 Answers