|
In using the script below, my model rotates very slowly when I press the left or right input keys. Does anyone know how to increase the rotation speed? Any help will be very appreciated! private var walkSpeed : float = 1.0; private var gravity = 100.0; private var moveDirection : Vector3 = Vector3.zero; private var charController : CharacterController; function Start() { charController = GetComponent(CharacterController); animation.wrapMode = WrapMode.Loop; } function Update () { if(charController.isGrounded == true) { if(Input.GetAxis("Vertical") > .1) { if(Input.GetButton("Run")) { animation.CrossFade("run"); walkSpeed = 4; } else { animation["walk"].speed = 1; animation.CrossFade("walk"); walkSpeed = 1; } } else if(Input.GetAxis("Vertical") < -.1) { animation["walk"].speed = -1; animation.CrossFade("walk"); walkSpeed = 1; } else { animation.CrossFade("idle"); }
}
(comments are locked)
|
