Gamepad + HMD first person setup

18 November 2016 12:32
We are currently in the early stages of developing a first person view scene setup with HMD support. (Gamepad for movement, Oculus Rift for display, running on WebVR-enabled Chromium on Windows 10)

We have a simple character, with the main camera attached to it to create the first-person view effect (similar to the Jungle Outpost tutorial scene). So, I've prepared a very basic gamepad setup to move the character around. If the camera is controlled the traditional way (via mouse with request_pointerlock), the character moves as expected (i.e. going forward on the gamepad will move the character directly ahead to the direction he is looking to).

But, when introducing the Oculus setup (via request_fullscreen_hmd and enable_hmd) so that camera orientation is controlled with the VR headset, the movement of the character is unlinked from the camera orientation (i.e. going forward on the gamepad will always move the character north, no matter in which direction the user is looking with the HMD).
This behavior would work fine for vehicle-type scenes (as in the Space Disaster demo), but not so well on character walking scenes as ours. I think there might be some easy way to link the character rotation to the orientation of the camera, but haven't been able to figure it out so far. Any ideas?

Thanks a lot!
18 November 2016 17:10

New FPS addon for first person applications will be available in the upcoming release. It also enables HMD, creates gamepad and keyboard controls, creates default interface for mobile devices. It's going to be easier to use this addon to enable FPS controls.

Forget to say, the new release will be available next week.
21 November 2016 12:50
Thanks Roman,
That's great news, looking forward to checking out the release as soon as it comes out!
Please register or log in to leave a reply.