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);
}
}
Also in C#:
- c# get all class properties
- wpf use enum description
- what is the or symbol in C#
- c# convert Unix time in seconds to datetime
- Celsius to Fahrenheit c#
- how to parse a string to an integer c#
- unity how to move an object to another object
- c# new dictionary linq
- c# loop string array
- c# stop loop
- get random value from list c#
- asp net identity add a unique fields to user
- sum the digits in c#
- convert array object to int[] c#
- c# if statement
- make a list c#
- unity rotate object c#
- how to check if textbox is empty in c#
- c# polymorphism
- remove from list based on condition c#
- zoom gedit
- regex in c#
- get normal from 3 points
- unity rotate object relative to camera