-
Notifications
You must be signed in to change notification settings - Fork 1
Pointer
Josh Stovall edited this page Dec 21, 2020
·
2 revisions
track what use is pointing at
in VR, it creates a raycaster on their controller
in 2D, it tracks the mouse location
See the live demo.
Name | Type | Options | Description |
---|---|---|---|
type |
string |
2D 3D
|
type of pointer |
length |
float |
length of pointer | |
action |
functions |
function to call on click |
// setup controller
var controller = new XR.Gamepad();
// setup pointer
new XR.Pointer({
type: '3D',
length: 10,
action: myFunction,
bind: controller.right
});