|
I would like to create a boolean option for selecting whether the axis for MouseX and MouseY is inverted or not. I can obviously change this from within the Input Manager, but I would like to do this using the Unity GUI. I couldn't find anything in the scripting references. Any help would be greatly appreciated.
(comments are locked)
|
|
Have a boolean variable which determines whether the input should be flipped. You can then simply multiply the Input value by -1 if the boolean value is true. Something like this:
You can then change "flipY" to true, and the inputY values will be reversed. I have been looking at this example of yours and I think you are using the MouseLook.cs script in conjunction with this code right? Now I understand your piece of code here. It make's perfect sense to me but how to I use this to access the other script. I mean I know that MouseLook.cs will have to be on the same GameObject which is acting on but how do I connect the two via code.
Dec 03 '10 at 04:36 PM
mimatos
I'm a little perplexed here too. The mouselook.cs script does not seem to like 'var' in the unity script sense. How do we make the two scripts interact?
Jan 08 '11 at 08:38 PM
phosfiend
(comments are locked)
|
