Horje
how to look around with mouse in unity Code Example
how to look around with mouse in unity
public class CameraController : MonoBehaviour //The script should be on the camera or on the player if it is a sphere
{
	
  	Vector2 rotation = Vector2.zero;
	public float speed = 3; //the sensibility

	void Update () 
    {
		rotation.y += Input.GetAxis("Mouse X");
		rotation.x += -Input.GetAxis("Mouse Y");
		transform.eulerAngles = (Vector2)rotation * speed;
	}
}




Csharp

Related
how to set foreground from code wpf Code Example how to set foreground from code wpf Code Example
bootstrap 4 Code Example bootstrap 4 Code Example
scene switch unity Code Example scene switch unity Code Example
raycasthit unity Code Example raycasthit unity Code Example
an existing connection was forcibly closed by the remote host. .net core Code Example an existing connection was forcibly closed by the remote host. .net core Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8