예제 #1
0
 public override void DisableInput()
 {
     base.DisableInput();
     if (characterController != null)
     {
         characterController.SetMovementInputs(Vector3.zero);
         characterController.SetRotationInputs(Vector3.zero);
     }
 }
예제 #2
0
        // Called when this input script is disabled, e.g. when the game agent exits a vehicle
        public override void DisableInput()
        {
            base.DisableInput();

            if (m_RigidbodyCharacterController != null)
            {
                // Stop moving and rotating the character
                m_RigidbodyCharacterController.SetMovementInputs(Vector3.zero);
                m_RigidbodyCharacterController.SetRotationInputs(Vector3.zero);
            }
        }