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

OVRUnityHumanoidSkeletonRetargeter Class

Extends OVRSkeleton
A partial class definition of the class responsible for retargeting from OVRSkeleton body tracking bones to a third party humanoid skeleton.
Unlike OVRCustomSkeleton, the skeleton retargeted to does not need to use bones that match body tracking names, or have a hierarchy that matches what body tracking expects. Instead, you can use this class to apply body tracking to characters that have been imported as Unity Humanoids.
This partial definition contains maps useful for retargeting, such as maps between body tracking and humanoid bones for upper body and full body tracking.
Unlike OVRCustomSkeleton, the skeleton retargeted to does not need to use bones that match body tracking names, or have a hierarchy that matches what body tracking expects. Instead, you can use this class to apply body tracking to characters that have been imported as Unity Humanoids.
This partial definition is responsible for meta data applicable for retargeting, such as bone-to-bone pairs in body tracking and Humanoid skeletons. These bone-to-bone pairs are used to align the Humanoid (target) skeleton to the body tracking (source) skeleton, so that a Humanoid can be driven by body tracking movements.
Unlike OVRCustomSkeleton, the skeleton retargeted to does not need to use bones that match body tracking names, or have a hierarchy that matches what body tracking expects. Instead, you can use this class to apply body tracking to characters that have been imported as Unity Humanoids.
This partial definition is responsible for computing the offsets between the source (body tracking) and target (Humanoid) skeletons, which will be used animate the target based on the source's movements.

Member Enumerations

Enumeration UpdateType

Since the retargeter's Update function is driven by OVRSkeleton's calls via FixedUpdate as well, the variable allows one to control how often updates occurs.
Use this field to allow updates during physics ticks, update ticks, or both.
FixedUpdateOnly
= 0
UpdateOnly
No description available
FixedUpdateAndUpdate
No description available

Properties

OVRSkeletonMetadata SourceSkeletonData[Get]
OVRSkeletonMetadata SourceSkeletonTPoseData[Get]
OVRSkeletonMetadata TargetSkeletonData[Get]
Animator AnimatorTargetSkeleton[Get]
Dictionary< BoneId, HumanBodyBones > CustomBoneIdToHumanBodyBone[Get]
Dictionary< HumanBodyBones, Quaternion > TargetTPoseRotations[Get]
JointAdjustment[] Adjustments[Get]
OVRHumanBodyBonesMappings.BodySection[] FullBodySectionsToAlign[Get]
OVRHumanBodyBonesMappings.BodySection[] BodySectionsToAlign[Get]
OVRHumanBodyBonesMappings.BodySection[] FullBodySectionToPosition[Get]
OVRHumanBodyBonesMappings.BodySection[] BodySectionToPosition[Get]
This returns body bone mappings, based on OVRHumanBodyBonesMappingsInterface.
Use this field in case the default mappings fall short and you wish to override them with a custom one that works with a specific characters.

Protected Fields

JointAdjustment[] _adjustments[Get]
OVRHumanBodyBonesMappings.BodySection[] _fullBodySectionsToAlign[Get]
OVRHumanBodyBonesMappings.BodySection[] _bodySectionsToAlign[Get]
OVRHumanBodyBonesMappings.BodySection[] _fullBodySectionToPosition[Get]
OVRHumanBodyBonesMappings.BodySection[] _bodySectionToPosition[Get]
Controls if we run retargeting from FixedUpdate, Update, or both, and is based on the enum OVRUnityHumanoidSkeletonRetargeter.UpdateType.

Member Functions

Default constructor for the retargeter class that initializes the instance's skeleton type to match half body tracking.

Protected Functions

Start this instance.
Initialize data structures related to the body tracking's skeleton.
virtual void OnValidate ( )
virtual override void Update ( )
bool ShouldRunUpdateThisFrame ( )
void RecomputeSkeletalOffsetsIfNecessary ( )
Indicates if skeletal offsets will be computed during this frame.
This usually happens if there is a change in the input skeletal data, a change in the target skeletal scale, et cetera.
Returns
True if computation is required; false if not.
Compute skeletal offsets using the current input skeletal data and the target skeletal data.
JointAdjustment FindAdjustment
( HumanBodyBones boneId )

Object Data for protected-static-func

static bool IsBodySectionInArray
OVRHumanBodyBonesMappings.BodySection[] sectionArrayToCheck )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon