- Home /
1st Person Character Controller
I am fairly new to unity, this is my 1st game. I am developing a 1st person type game. I am using a character controller and it is moving fine, except when I turn. The character is turning but moveDirection is not. I have been looking for how to make the character controller turn but I keep finding 3rd person character controllers and the code that is being used confuses me. Can anyone help me, point me in the right direction? I'm sorry if I'm asking a stupid question that has already been answered. I am using the w,a,s,d keys to move forward, backward, left, and right and I am using the mouse to turn and look up and down. I'm using transform.Rotate to rotate the character about the y-axis and Input.GetAxis("Mouse X") to get the input. When I started I wasn't using a character controller but now I need one.
Answer by AJ12AY · Mar 24, 2013 at 07:59 PM
Can you not use the default First Person Character Controller made by Unity under the Favorites/All Prefabs? That should work for your purposes.
I already have most of it done already. I can move forward, backward, left and right. I just can't turn. The character itself turns but the Vector3 moveDirection that I can using to move the character controller isnt rotating with the character. I am using controller.$$anonymous$$ove(moveDirection), whereas controller is the character controller that is attached to the character.
Your answer
Follow this Question
Related Questions
AddExplosionForce not affecting RigidBodies 0 Answers
How to 1stViewChar moves forward automatically? 1 Answer
character turning problem! 0 Answers
[C#]CharacterController Turning 2 Answers
Change Direction[C#] 1 Answer