- Home /
 
               Question by 
               pion · Aug 07, 2011 at 06:28 AM · 
                third-person-controller  
              
 
              Third Person Controller moves left or right
I am using the Standard Assets Third Person Controller on Unity 3.4.
It seems that it can only walk forward and backward.
How can I move it to the left or right?
Thanks in advance for your help.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by pion · Aug 07, 2011 at 05:31 PM
Third Person MMO Controller has Sidestep example.
After following Third Person Controller rotation limitation discussion, I then modified the following ThirdPersonController.js code:
function Update() {
var movement;
...
 if(!movingBack)
 {
     movement = transform.forward * moveSpeed + Vector3 (0, verticalSpeed, 0) + inAirVelocity;
     // Add Sidestep. See README on http://u3d.as/content/unity-technologies/third-person-mmo-controller/1Wt
     movement.x += Input.GetAxis ("Sidestep");
     movement *= Time.deltaTime;
 }
     ...    
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                