|
I am trying to constrain my mouse look to rotate only on the z axis. The mouse look script that comes with unity only has the choices to change the x and y axis. Can anyone expain how to do this or refer me to a reference page, a video tutorial or a script? thanx
(comments are locked)
|
|
Just delete some thing like rotationY += Input.GetAxis("LookUp") * lookSpeed; in the script.
(comments are locked)
|
|
I think that you want the character to rotate sideways with the camera... like an fps game? if so then what you do is put the camera-control script on the camera an set it to only have an x speed for sensitivity,then go to your parent, player(the object that has your walking script) then put the camera rotate on that also, but this time make X = 0, and y = 5(or what ever you want for the turn speed. i hope this is what your looking for and helps....
(comments are locked)
|

What exactly do you wanna do? In the MouseLook script, the character rotates on the Y axis (horizontal plane), and the camera rotates on the X axis (vertical plane). If you rotate the camera on the Z axis, it will tilt to left or right. Is it what you're looking for?