I want my character to look on the mouse cursor so I wrote in the Update method:
“transform.rotation = Quaternion.Euler(0, Input.mousePosition.x * rotateSpeed, 0);”.
the problem is that when the mouse cursor comes to the end of the screen he stop so the player can’t keep rotating.
Anyone help with that?
Note: Input.mousePosition reports the position of the mouse even when it is not inside the Game View, such as when Cursor.lockState is set to CursorLockMode.None.