I’ve followed the gui essentials tutorial, and whenever I press the play button the player (First Person Controller prefab) seems to move mysteriously. I can affect the movement with W, A, S and D, but it still doesn’t make much sense what’s going on. I saw similar behavior in the AngryBots example project. I can’t make heads or tails of what the controls are doing to the player. Finally I discovered my (rarely-used) joystick was influencing the movement. But even with that knowledge I can’t figure out why the player is moving the directions it is in response to the directions I press. Let me try some experiments and report the results, and maybe someone can help me make sense of this:
- Don’t touch any controls (just press play): Result - Player lands on the surface of the plane, wanders forward and to the right until falling off the plane.
- Click play, then quickly click the game view and press W before play begins: Result - All the controls do seem to make sense in this case. The player doesn’t wander, W moves forward, A moves left, etc.
- Click play, then try to use the joystick as a controller: Result - I have a hard time staying on the plane long enough to try to find any pattern. It seems the mouse still controls the direction I’m looking, and for the life of me I can’t find any pattern to which actions on the joystick control which reactions my the player. I can try to hold the joystick steady and still get apparently random motion. My joystick has 4 axes - left/right, forward/back, twisting the stick, and a dial/wheel control at the base.
I suspect simply disabling the joystick is best, it really doesn’t make sense in conjunction with the mouse. But I kind of wonder what the designer of this prefab was thinking and intending with accepting inputs from all controllers (keyboard, joystick and mouse) at once. How does this make sense?