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.
|
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.
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 |