if(Input.GetAxis("W")){
transform.transformDirection(z * -moveSpeed);
}
I just want to do this the simplest way possible. That doesn’t work. Help?
if(Input.GetAxis("W")){
transform.transformDirection(z * -moveSpeed);
}
I just want to do this the simplest way possible. That doesn’t work. Help?
create gameObject.
Add CharacterController component.
create a gameObject,
attcah a script.
in that script…
var = charCntrlr : CharacterController;
var = character : GameObject;
function Start()
{
charCntrlr = character.GetComponent(CharacterController);
}
function Update()
{
charCntrlr.Move(Vector3.right * 1);
}
Got it. Thanks