First Person Controller Erratic

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:

  1. 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.
  2. 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.
  3. 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?

Unity Has built in support for all types of joysticks and support in order for you to create games on many different platforms, that being said with a joystick that is older or sometimes well used this problem can happen. I have an xbox 360 controller which when plugged in and the input is changed that the look moves slowly, it’s just due to the controller being older. But the support for all controllers only works for movement and I believe is handled in the Character controller class. That being said you can also add whatever buttons you want to use. Technically there are 7 axis for an xbox controller.

i would give this link a look for more information on controllers

I would also suggest that if you aren’t using your joystick perhaps disabling it while you are working in unity would be best.