rotate player unity
//This is how you rotate your player left and rigth with the wrrow keys:
public class Test : MonoBehaviour
{
public float RotateSpeed = 30f;
void Update ()
{
if (Input.GetKey(KeyCode.LeftArrow))
transform.Rotate(-Vector3.up * RotateSpeed * Time.deltaTime);
else if (Input.GetKey(KeyCode.RightArrow))
transform.Rotate(Vector3.up * RotateSpeed * Time.deltaTime);
}
}
Also in C#:
- unity how to load up a scene
- unity add component
- xarray: create 2d dataset
- variables
- C# Cast double to float
- comment envoyer un socket C#
- jumping with character controller unity
- unity while in trigger
- unity how to get transform scale
- generic repository pattern c#
- get enum by index c#
- c# switch statement
- increase variable C#
- C# events
- how to allow user import image c#
- how to find the area of a circle
- unity create a child object
- C# get all files in directory
- datatable return column names
- c# skip following code in loop
- c# new list object
- c# get enum in list
- how to reference function in unity
- visual studio clear text script