Jump to content

VRExperienceHelper Gamepad Conflict


MackeyK24
 Share

Recommended Posts

Yo @davrous ... Again bro thanks for the break down on WebVR. As you seen before i have the VRExperienceHelper support right on the Camara Rig for the toolkit... Everything works so good...

Occulus Go with controller work great, looks very nice in VR... Teleportation work great...

I have only one issue with the Gamepad usage when in NON-VR mode. Once you call scene.createDefaultVRExperience() the VRExperienceHelper TAKES CONTROL of the gamepad even though NOT in VR Mode.... I have not pressed the enter VR Button. And if i try use gamepad to turn or use the right stick it give an error about no property 'x' for a Quaternion Rotation:

874663133_ScreenShot2018-06-26at6_11_20PM.thumb.png.cb0f823748b4b959133937dd0867e11b.png

If i dont have the VRExperienceHelper created, it works fine... So the VRExperienceHelper must be using the gamepad input even though NOT in VR Mode.

My hope as to setup game as regular scene using my First Person Camera Movement (which works fine until i create the VRExperienceHelper) but have the OPTION of going into VR Mode by pressing the VR Button. But when the VRExperienceHelper is created, the gamepad no long responds correctly to my input.

Can we put some kind of flag or something so when NOT in VR mode DONT do anything with gamepad input so i can still use the gamepad like normal when NOT in VR Mode ???

 

Link to comment
Share on other sites

13 hours ago, MackeyK24 said:

Can we put some kind of flag or something so when NOT in VR mode DONT do anything with gamepad input so i can still use the gamepad like normal when NOT in VR Mode ???

I don't think it's doing a lot extra with that controller:
https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/VR/babylon.vrExperienceHelper.ts#L1057
I don't have a controller.  It's not a solution, but did you try to disable interactions/teleportation to see if that was it?  I don't see the cause from that stack trace...

 

Link to comment
Share on other sites

Yo @davrous ... Its the enable teleportation... If you enableTeleportation while playing the game in NON-VR MODE (waiting for VR Button to be pressed) it gets the error above i move game joysticks... Once you go into VR mode it works great... So we must be "handing gamepad input" in the VRExperienceHelper class EVEN when in NON-VR mode... I thinnk thats whats going on here :(

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...