unity 3d mouse look script
public float lookSpeed = 3;
private Vector2 rotation = Vector2.zero;
public void Look() // Look rotation (UP down is Camera) (Left right is Transform rotation)
{
rotation.y += Input.GetAxis("Mouse X");
rotation.x += -Input.GetAxis("Mouse Y");
Camera.main.transform.localRotation = Quaternion.Euler(rotation.x * lookSpeed, rotation.y * lookSpeed, 0);
}
Also in C#:
- get enum by index c#
- dontdestroyonload unity
- wpf label text in center
- rotatearound unity
- unity set sprite transparency
- hash sign c sharp
- unity instantiate vector3
- c# use hashtable check if key exists
- out parameters c#
- how can convert string to int csharp
- snippet to create constructor in asp.net c#
- c sharp if string equals
- c# array isn't working
- how to convert a number to 2 decimal places in c#
- Could not load file or assembly 'Ubiety.Dns.Core, Version=2.2.1.0
- c# creating exceptions
- unity read text file
- how to insert <input> datatype <td> in asp.net core table
- getcomponent c#
- mouseposition unity
- decalre an int list mvc
- C# .NET Core linq Distinct
- how to route back to url using Request.Headers["Referer"].ToString() in asp.net core
- vb.net drag window without titlebar