I’m following a tutorial for Unity 3.5, and trying to set up something where escape key can be used to toggle system cursor on and off, and also to freeze the responsiveness of Unity to user input (so you can move cursor up to deselect the play button without game responding to your moving cursor)
The Input.resetInputAxes() does freeze motion in response to mouse movements left and right, and also deactivates the WASD movement keys. But game still follows mouse movements Up and Down when shouldn’t respond at all. Any ideas on problem?
Hi Guys the Mouse look script is also on the controller and that is still active
You would have to do the same to the other script or scripts you have on the controller
that you did in the tutorial.
Maybe the controller only had one script on it back when the tut was made
For those following the Lynda Unity 3.5 tutorial - as Mike mentions above, there are two different scripts for mouse control of the camera (I’m using Unity 4.5.1f3);
i) FPSInputController.js directly on the ‘First Person Controller’ object
ii) MouseLook.cs on the ‘Main Camera’ child of First Person Controller
If you apply the tutorial code only to the first script, the game view will still tilt up and down the Y axis in response to mouse movement. Simply apply the code from the tutorial to the second script as well as the first (translating syntax from JavaScript to C# where appropriate) and you should see the desired result.