Class UnderCameraBodyPositionEvaluator
Scriptable object that estimates the user's body position by projecting the position of the camera onto the XZ plane of the Unity.XR.CoreUtils.XROrigin.
Implements
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[CreateAssetMenu(fileName = "UnderCameraBodyPositionEvaluator", menuName = "XR/Locomotion/Under Camera Body Position Evaluator")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.UnderCameraBodyPositionEvaluator.html")]
public class UnderCameraBodyPositionEvaluator : ScriptableObject, IXRBodyPositionEvaluator
Remarks
This is the default bodyPositionEvaluator for an XRBodyTransformer.
Methods
GetBodyGroundLocalPosition(XROrigin)
Gets the position of where the user's body is grounded (e.g. their feet), in the local space of the Unity.XR.CoreUtils.XROrigin.Origin.
Declaration
public Vector3 GetBodyGroundLocalPosition(XROrigin xrOrigin)
Parameters
Type | Name | Description |
---|---|---|
XROrigin | xrOrigin | The XR Origin whose body position to get. |
Returns
Type | Description |
---|---|
Vector3 | Returns the position of where the user's body is grounded, in the local space of the Unity.XR.CoreUtils.XROrigin.Origin. |