Controls working?

I have written the PlayerControls c# Script and tested it like shown in the video. I don’t see anything but 1 or -1 in the UnityEngine Debug:Log. I pushed on the keys A and D on my keyboard and move the joystick on my XBox controller but I do not see and of those movements in the Debug Log. I know the XBox controller works because I have used in in games.

Any suggestions to why this is happening? Here is a picture of the C#Script and the Console output showing only -1, 1 or 0.

Hi Richard,

If you get -1 or 1 in the console when you move the joystick, the controller is working with Unity. If it does not, close Unity, plug your joystick out and in again. Then start Unity again. I have an XBox controller, too, so I know that they work if they are not broken.

What did you expect to see in the Console? If you expected values between -1 and 1, got to Edit > Project Settings > Input Manager and try to change something there. Also take a look at the manual.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms