API reference
API reference
Select your platform
No SDKs available
No versions available

OVRGLTFAnimatinonNode Class

Helper class specifically used for animating buttons, triggers, and thumbsticks on GLTF (GL Transmission Format) controller models loaded from the Meta Quest Runtime.
Controller input is passed in from which is then used to update the poses of each coresponding button, trigger, or thumbstick on the controller models. These animation functions are used specifically for the Controller Models loaded from the Meta Quest Runtime. We do not recommended using these functions any other GLTF models.

Constructors

OVRGLTFAnimatinonNode ( inputNodeType , gameObj , morphTargetHandler )
Creates a new OVRGLTFAnimationNode object which is used to animate a controller button, trigger, or joystick.
Signature
OVRGLTFAnimatinonNode(OVRGLTFInputNode inputNodeType, GameObject gameObj, OVRGLTFAnimationNodeMorphTargetHandler morphTargetHandler)
Parameters
inputNodeType: OVRGLTFInputNode  Input node type used to specify if this node is a button, trigger, or joystick.
gameObj: GameObject  Game object associated with the node being animated.
morphTargetHandler: OVRGLTFAnimationNodeMorphTargetHandler  The morpph target data that is required for animating this node.

Methods

AddChannel ( channel , samplers , dataAccessor )
Adds an animation channel to this animation node.
Check the GLTF animation channel section in the GLTF 2.0 specification page for more information.
Signature
void AddChannel(JSONNode channel, JSONNode samplers, OVRGLTFAccessor dataAccessor)
Parameters
channel: JSONNode  The JSON node containing data for the animation channel.
samplers: JSONNode  The JSON node containing GLTF samplers.
dataAccessor: OVRGLTFAccessor  The OVRGLTFAccessor object for retriving animation data.
Returns
void
UpdatePose ( down )
Updates the pose of a controller button object based on button down state.
Signature
void UpdatePose(bool down)
Parameters
down: bool  If the button is being pressed.
Returns
void
UpdatePose ( t , applyDeadZone )
Updates the pose of a object based on a float value.
Signature
void UpdatePose(float t, bool applyDeadZone=true)
Parameters
t: float  The floating point value ranging from 0.0f to 1.0f.
applyDeadZone: bool  If a dead zone should be applied to the animation. The object will not move until the dead zone threshold is exceeded.
Returns
void
UpdatePose ( joystick )
Updates the pose of a controller joystick object based on the joystick's x and y position.
Signature
void UpdatePose(Vector2 joystick)
Parameters
joystick: Vector2  The floating point value of the joystick's x and y position.
Returns
void