rotate an object, at the axis the mouse moves.

Hi all,

Im looking for a script to rotate an object in the same axis the mouse is moving,

i want to rotate an object up and down when i move the mouse over the Y axis,

and i want to rotate another object horizontally when i move the mouse over the X axis.

since i am new, i dont really have an idea how to start. i am still learning and i have followed some tutorials, but i am willing to learn :wink: all help or suggestions are welcome.

thanks in advance,
~speedytzr :wink:

The included script Standard assets/Camera/MouseLook.cs should do what you need.

thanks :wink:

i have modified the script a little, and it works exactly how i wanted it to work now :slight_smile: