コード例 #1
0
 // Method to calculate the turn input
 private void calculateTurnInput()
 {
     motor.setTurnInput(Input.GetAxis("Horizontal"));
     if (physicsAttributes.getOnGround())
     {
         transform.rotation = Quaternion.Euler(
             transform.rotation.eulerAngles +
             new Vector3(0f, motor.getTurnInput() * motor.turnStrenght * Time.deltaTime * Input.GetAxis("Vertical"), 0f)
             );
     }
 }