Vive Focus Controller (WebVR)


I just tested BabylonJS with the Vive Focus and identified some issues.

The trigger button (id: 1) does not initiate a call to scene.onPointerDown.

Furthermore the position of the controller in VR is somehow weird.
At the beginning the controller appears in the middle of the head.
When I move up/down, forwards, backwards or left/right (6DOF tracking) the controller in VR keeps its position in VR space.

Since it is only a 3DOF controller, the real position cannot be tracked.
I think the correct behavior in that situation is that the position of the controller is always updated from the head position and than added some delta so that it appears right down relative to the head position.

I tested with the latest version of “Firefox Reality” since the “Vive Browser” does not support WebVR at all.

If there is anything I can do to assist, like further testing etc. please let me know.

Edit: The issue with the controller position could also be a problem of Firefox Reality since the demo from also shows this problem. XX - VR Controllers

Best regards,

Pinging our VR expert @trevordev

Hey @tortru,

Unfortunately, I don’t have easy access to a Vive Focus to test for me to easily fix this so it might be tricky.

The poseEnabledController.ts contains an InitiateController method which is likely creating the wrong controller type, when you look at the controller what does it look like? (Vive controller, gearVR controller etc). When the controller is loaded would you be able to print out gamepad.browserGamepad Im interested in the id property to help figure out what controller type it is detected as. If we add it as a case in the gearVRController.ts file’s canCreate method I think it might resolve your issue.

Erm Wat
Wish i had one of these to play with.

Hi @trevordev,

The controller looks like a Gear VR controller.

The value of is “HTC Vive Focus Controller”.

controller.browserGamepad: Gamepad
axes: Array [ 0, 0 ]
​​buttons: Array [ GamepadButton, GamepadButton ]
​​connected: true
​​displayId: 1
​​hand: “right”
​​hapticActuators: Array []
​​id: “HTC Vive Focus Controller”
​​index: 0
​​mapping: “”
​​pose: GamepadPose { hasOrientation: true, hasPosition: false, position: null, … }
​​timestamp: 172470
​​prototype: GamepadPrototype { id: Getter, index: Getter, mapping: Getter, … }

I think it is not worth investing time into compatibility with the “Vive Browser” since “Firefox Reality” will become the default browser on Vive Headsets.

@tortru Thanks for the info, from this I think the issue is its being detected as a generic controller (which shows gearVR looking controller), I will try to make it detected as a gearVR controller so it has similar 3dof interactions (Oculus GO is also handled this way). After it’s merged you can try it again and let me know if you still have issues.

I will re-test on the playground and inform you about the result as soon as the new alpha version has been released.



I tested with the latest 4.1.0-alpha.1 and the controller is now behaving correctly.
Also onPointerDown is now correctly called when pulling the trigger.

Best regards