Hello (and pls sorry for my English)! I want to make a system: when player holding the right mouse button and moves the mouse, the camera rotates left or right depending on the mouse direction. This script works perfectly well, but the editor keeps writing in the console that I should use GetWorldRotation instead of GetRotationZ. I tried to replace GetRotationZ with GetWorldRotation and this doesn’t work.
GetWorldRotation returns a Vector3 instead of a number, so you need to use:
To get the Z value you’re looking for.
Thank you very much, this works perfectly!