I tried using the Mouselook script, but I can’t seem to get it to work. I attached it to my camera, but when I play the game, nothing happens when I move the mouse. I put a Debug.Log in there to show the value of GetAxis(“Mouse X”), and it reads 0, no matter how much I move the mouse. What am I missing?
I’ve not used the MouseLook script on its own, only in combination with an FPSwalker script in a controller.
I’d be tempted to try rebuilding it, and seeing if I’d missed something?
Also, have a look in the top of both of the FPSWalker.js and Mouselook.cs scripts - there should be some useful instructions there, as I recall.
I too did not return with the methode : GetAxis ( “Mouse X”) ?
Vista…
Edit : everything works!
Well, for some reason, it is working intermittently. I closed Unity and restarted it, and it worked. Then I made a change to the script, and it didn’t work. I verified I’d saved it. I tried closing Unity again and reopened it. It worked. Is there something with cs scripts that you have to close and restart Unity to make changes take effect?
no not unless something is interfering or a script of you crashed the compiler in which case the restart is needed to restart the compiler