so this is my code .
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ok : MonoBehaviour
{
float rotSpeed = 10;
void OnMouseOver()
{
float rotX = Input.GetAxis("Mouse X") * rotSpeed * Mathf.Deg2Rad;
float rotY = Input.GetAxis("Mouse Y") * rotSpeed * Mathf.Deg2Rad;
transform.RotateAround(Vector3.up, -rotX);
transform.RotateAround(Vector3.up, -rotY);
}
}
what it does is that on the movement of mouse it rotates the object . i would like to change it from movement of mouse to movement to cursor .