0
votes

I've been trying to get the Xbox controller working in VR for some time. I'm now using Unity 5.2.2, and just imported Oculus Utilities 0.1.3 into a clean project.

I've created an instance of the OVRPlayerController prefab, removed the original camera, and placed some blocks around the scene. I've set the Gravity Modifier to zero for the moment, so the player doesn't immediately fall downwards.

However, when I launch the game and move the left stick on the controller, the player does not move forward. The right stick and bumpers turn the player left and right, but the left stick doesn't do anything.

I had the same problem with Oculus Utilities 0.1.0 and 0.1.2; even with or without copying the InputManager.asset file from the Oculus Utilities zip.

How can I get the player moving forwards and backwards?

And for bonus points – how do I enable 'Comfort Mode', where the right stick turns the player 45 degrees at a time?

1

1 Answers

1
votes

Your problem is probably your gravity modifier. Instead, right click and add a Terrain (center it at x:-250, y:0, z:-250) and now your player will not fall through the ground.

Comfort mode on the Xbox controller is not the right stick; it is the left and right bumpers that step your rotation 45 degrees (or whatever you set it to in the player controller). The button mapping is hard coded within the OVR Player Controller script, but you can edit that to change it.

You can also use the XBox controller with native Unity (no need for the Oculus Utilities) by setting up the axes in the Input Manager. Refer to this diagram:

Xbox Controller button mapping