Creates a new WebVRController from a gamepad
the gamepad that the WebVRController should be created from
The type of controller (Eg. Windows mixed reality)
The default controller model for the controller
The device position in babylon space
The device rotation in babylon space
The scale factor of the device in babylon space
'left' or 'right', see https://w3c.github.io/gamepad/extensions.html#gamepadhand-enum
The mesh that is attached to the controller
Fired when the main button state has changed
Fired when the pad state has changed
Fired when controllers stick values have changed
Fired when the secondary button state has changed
Fired when the trigger state has changed
X and Y axis corrisponding to the controllers joystick
(Likely devicePosition should be used instead) The device position in its room space
The raw pose from the device
(Likely deviceRotationQuaternion should be used instead) The device rotation in its room space
Name of the child mesh that can be used to cast a ray from the controller
Attaches a mesh to the controller
the mesh to be attached
Attaches the controllers mesh to a camera
the camera the mesh should be attached to
Disposes of th webVRCOntroller
Gets the ray of the controller in the direction the controller is pointing
the length the resulting ray should be
a ray in the direction the controller is pointing
Loads a mesh and attaches it to the controller
the scene the mesh should be added to
callback for when the mesh has been loaded
Fired when a controller button's state has changed
the callback containing the button that was modified
Updates the state of the controller and mesh based on the current position and rotation of the controller
Updates the state of the pose enbaled controller based on the raw pose data from the device
raw pose fromthe device
Generated using TypeDoc
Defines the WebVRController object that represents controllers tracked in 3D space