Hi! I'm having trouble using the mouse wheel. I have a simple rts camera control script in which I use the mouse wheel to zoom in and out. Like so:
The problem is that it works fine in the editor game window and web player but if I make a stand alone build the wheel does nothing. I also use the wheel button to focus the camera on an object and make the camera follow it but that doesn't work in stand alone either. All other controls work fine.
asked Dec 12 '09 at 05:34 PM
Input is handled in the Update loop.
Update() runs as many times per frame as it can (although it is clamped to 50fps in the editor and web player).
FixedUpdate() always runs at the current Time interval, default is 50fps, I believe.
If you only test for input in the Fixed Update loop it is possible that 2 Update frames occur for each FixedUpdate() frame (your game is running at 100fps, in this example).
If on the first Update you click, the second Update will clear that click, and then when FixedUpdate runs, it will say 'there aren't any clicks' - hence input is broken.
Since the editor and web player are clamped to a lower speed, you are less likely to have this problem, however your own solution is best. Test for input in Update(), not FixedUpdate().
answered Dec 27 '09 at 05:49 AM
i have problems like this if i accidently made a change to the settings in a stand alone build of the game, at the screen that pops up before the game,so when that window pops up, look into its controls and just check its settings out, I do not, however, know if even appears there..
answered Dec 12 '09 at 06:17 PM