Manos Posted March 8, 2018 Share Posted March 8, 2018 Hello guys, babylon newbie here . So I have created a simple scene using WebVRFreeCamera and testing it with WebVR chrome plugin. Is there someway to emulate the touch controllers?? Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 8, 2018 Share Posted March 8, 2018 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 MichaelD 1 Quote Link to comment Share on other sites More sharing options...
MichaelD Posted March 9, 2018 Share Posted March 9, 2018 I think what he is asking (and would like to know my self as well) is how can we emulate the controller events without actually having any physical controllers or VR-Set (if possible). Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 9, 2018 Share Posted March 9, 2018 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 Manos 1 Quote Link to comment Share on other sites More sharing options...
Manos Posted March 14, 2018 Author Share Posted March 14, 2018 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.