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

OVRBone Class

Extends IDisposable
OVRBone represents bone data obtained from hand or body
tracking.
You can use it to access the transform that tracks the bone's movements, as well as the bone ID associated with the transform. You can retarget each bone to a character's skeleton so that a person's movements can be represented by a visual representation.
Find examples of how this class is used in OVRSkeleton.

Constructors

OVRBone ()
OVRBone constructor which does not require joint data as arguments, which means its fields will remain invalid unless you set them after instantiation.
Signature
OVRBone()
OVRBone ( id , parentBoneIndex , trans )
OVRBone constructor that requires joint data as arguments, such as the bone ID, parent bone index, and the transform associated with the bone.
Signature
OVRBone(OVRSkeleton.BoneId id, short parentBoneIndex, Transform trans)
Parameters
id: OVRSkeleton.BoneId  Bone ID.
parentBoneIndex: short  Parent bone index.
trans: Transform  Associated bone transform.

Properties

[Get][Set]
The identifier associated with the OVRSkeleton bone being tracked.
For instance, the Id can correspond to body tracking spine bones and you may use them to deduce curvature. Query the OVRSkeleton.Bones and OVRSkeleton.BindPoses fields to look up bones by this identifier.
Signature
OVRSkeleton.BoneId Id
ParentBoneIndex : short
[Get][Set]
The index of the parent bone, if one exists, for the current bone.
Use this field to index into the list of available bones.
Signature
short ParentBoneIndex
Transform : Transform
[Get][Set]
The transform that is created at runtime.
Use this to track the pose of the character's bone.
Signature
Transform Transform

Methods

Dispose ()
This function destroys the GameObject tracking the skeletal bone.
This prevents the GameObject from persisting after the skeleton instance is no longer relevant.
Signature
void Dispose()
Returns
void