Answers for "c# unity rotate first person controller script"

C#
0

c# unity rotate first person controller script

public class myFPSBehavior : MonoBehaviour {
     public float rotationSpeed = 10.0F;
     
     void FixedUpdate()
     {
         if (Input.GetKey("escape"))
             Application.Quit();
 
         float rotation = Input.GetAxis("Rotate") * rotationSpeed;
   
         rotation *= Time.deltaTime;
 
         transform.Rotate(0, rotation, 0);
     }
 }
Posted by: Guest on February-27-2020

Code answers related to "c# unity rotate first person controller script"

C# Answers by Framework

Browse Popular Code Answers by Language