lovr.headset.animate
EditAnimates a device model to match its current input state. The buttons and joysticks on a controller will move as they're pressed/moved and hand models will move to match skeletal input.
The model should have been created using lovr.headset.newModel
with the animated
flag set to true
.
success = lovr.headset.animate(device, model)
Arguments
Name | Type | Default | Description |
device | Device | 'head' | The device to use for the animation data. |
model | Model | The model to animate. |
Returns
Name | Type | Description |
success | boolean |
Whether the animation was applied successfully to the Model. If the Model was not compatible or animation data for the device was not available, this will be false .
|
Notes
Currently this function is only supported for hand models on the Oculus Quest.
It's possible to use models that weren't created with lovr.headset.newModel
but they need to be set up carefully to have the same structure as the models provided by the headset SDK.
See also
lovr.headset.newModel
lovr.headset