- Home /
Move left etc. according to where player faces
How can I make it so that the player goes right when he presses "D"? I've been trying things like this
rigidbody.velocity = -(Vector3.right * speed * Time.deltaTime);
But it moves according to the XYZ space, not depending on where the player faces. The movement I'm trying to get is like in FPS games. I do not want to use Character Controller.
Comment
Best Answer
Answer by Dave-Carlile · Oct 31, 2013 at 08:15 PM
Use transform.right instead of Vector3.right.
Your answer
Follow this Question
Related Questions
Making a bubble level (not a game but work tool) 1 Answer
Unity Physics On Input Issue? 0 Answers
Error Vector3 does not contain MoveTowards 3 Answers
How do I use Vector3 with rigidbody.Addforce 2 Answers
Movement Script Only Works in One Scene 2 Answers