Jump to content

VR touch controllers Emulator


Manos
 Share

Recommended Posts

Hi @Manos,

Nice to have you around :)

Of course, the controllers are already integrated in the system. If you use the VR-Helper you will have them automatically integrated in your scene (including transportation control and a lot of other nice features). You can read about the experience helper here - http://doc.babylonjs.com/how_to/webvr_helper

If you have any questions, please dont hesitate to ask

Link to comment
Share on other sites

Oh, I see :)

If this is the case - it will be hard to emulate those controllers. They are a part of the Gamepad API, and you will need to find a proper emulator that fits the newer extensions API (which also has the device pose, a main component in the vr controllers). I found this in a quick search - http://greggman.github.io/hft-gamepad-api/ , but this is more for the regular gamepads. The rest of the API will need to be emulated as well . The API is described here - https://w3c.github.io/gamepad/extensions.html

Link to comment
Share on other sites

On 3/8/2018 at 2:56 PM, RaananW said:

Hi @Manos,

Nice to have you around :)

Of course, the controllers are already integrated in the system. If you use the VR-Helper you will have them automatically integrated in your scene (including transportation control and a lot of other nice features). You can read about the experience helper here - http://doc.babylonjs.com/how_to/webvr_helper

If you have any questions, please dont hesitate to ask

Hello @RaananW,

so I have been playing with the VR-Helper and I'm trying to catch the event of gazing on a mesh. Works fine when I gaze to any mesh but there is an error when I try to insert the onSelectedMeshUnselected event. This is the code:

var VRHelper = scene.createDefaultVRExperience();
VRHelper.enableInteractions();

VRHelper.onNewMeshSelected.add((mesh)=>{
   console.log('gazed');
});

VRHelper.onSelectedMeshUnselected.add((mesh) => {
   console.log('not gazed');
});

What am I missing 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...