Class XRTransformStabilizer
Provides low-latency stabilization for XR pose inputs, especially useful on rays.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/XR Transform Stabilizer", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Inputs.XRTransformStabilizer.html")]
[DefaultExecutionOrder(-29985)]
public class XRTransformStabilizer : MonoBehaviour
Properties
| Name | Description |
|---|---|
| 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. |
| angleStabilization | Maximum distance (in degrees) that stabilization will be applied. |
| positionStabilization | Maximum distance (in meters) that stabilization will be applied. |
| targetTransform | The Transform component whose position and rotation will be matched and stabilized. |
| useLocalSpace | If enabled, will read the target and apply stabilization in local space. Otherwise, in world space. |
Methods
| Name | Description |
|---|---|
| ApplyStabilization(ref Transform, in Transform, in IXRRayProvider, float, float, float, bool) | Stabilizes the position and rotation of a Transform relative to a target Transform. |
| Awake() | See MonoBehaviour. |
| OnEnable() | See MonoBehaviour. |
| Update() | See MonoBehaviour. |