Im looking to hold the right mouse button and have the character be able to “look around” the area.
Here’s where im at with a script, I appreciate any help!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MouseRotation : MonoBehaviour
{
public float sensitivity = 0.1f;
public void Update()
{
if (Input.GetKey(KeyCode.Mouse1))
{
float rotationX = Input.GetAxis("Mouse X") * sensitivity;
transform.Rotate(Vector3.up, -rotationX, Space.World);
transform.Rotate(Vector3.right, rotationY, Space.World);
}
}