Class XRTransformStabilizer
Provides low-latency stabilization for XR pose inputs, especially useful on rays.
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.Inputs
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/XR Transform Stabilizer", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.Inputs.XRTransformStabilizer.html")]
[DefaultExecutionOrder(-29985)]
public class XRTransformStabilizer : MonoBehaviour
Properties
aimTarget
When provided a ray, the stabilizer will calculate the rotation that keeps a ray's endpoint stable. When stabilizing rotation, it uses whatever value is most optimal - either the last rotation (minimizing rotation), or the rotation that keeps the endpoint in place.
Declaration
public IXRRayProvider aimTarget { get; set; }
Property Value
Type | Description |
---|---|
IXRRayProvider |
angleStabilization
Maximum distance (in degrees) that stabilization will be applied.
Declaration
public float angleStabilization { get; set; }
Property Value
Type | Description |
---|---|
float |
positionStabilization
Maximum distance (in meters) that stabilization will be applied.
Declaration
public float positionStabilization { get; set; }
Property Value
Type | Description |
---|---|
float |
targetTransform
The Transform component whose position and rotation will be matched and stabilized.
Declaration
public Transform targetTransform { get; set; }
Property Value
Type | Description |
---|---|
Transform |
useLocalSpace
If enabled, will read the target and apply stabilization in local space. Otherwise, in world space.
Declaration
public bool useLocalSpace { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Awake()
See MonoBehaviour.
Declaration
protected void Awake()
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()
Update()
See MonoBehaviour.
Declaration
protected void Update()