Class XRHandSkeletonPokeDisplacer
Class used to displace the root pose of a hand skeleton based on a poke interaction to enable freezing the poke pose in place when pressing poke buttons or UI elements. It will help prevent the hand mesh visual from moving through buttons and UI that can be poked.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/XR Hand Skeleton Poke Displacer", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.Inputs.XRHandSkeletonPokeDisplacer.html")]
public class XRHandSkeletonPokeDisplacer : MonoBehaviour
Remarks
This component requires the XR Hands (com.unity.xr.hands) package version 1.3.0 or newer to be installed in your project.
This component is typically added to the Left and Right Hand Interaction Visual GameObjects that has the
XR Hand Skeleton Driver component, and references the XR Poke Interactor for that hand.
Properties
fixedOffset
Additional offset subtracted along the poke interaction axis to apply to the root pose when poking. Default value accounts for the width of the finger mesh.
Declaration
public float fixedOffset { get; set; }
Property Value
Type | Description |
---|---|
float |
pokeInteractor
Poke interactor reference used to get poke data.
Declaration
public IPokeStateDataProvider pokeInteractor { get; set; }
Property Value
Type | Description |
---|---|
IPokeStateDataProvider |
pokeStrengthSnapThreshold
Threshold poke interaction strength must be above to snap the poke pose to the current pose.
Declaration
public float pokeStrengthSnapThreshold { get; set; }
Property Value
Type | Description |
---|---|
float |
smoothingAmount
Smoothing to apply to the offset root. If smoothing amount is 0, no smoothing will be applied.
Declaration
public float smoothingAmount { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
Awake()
See MonoBehaviour.
Declaration
protected void Awake()
OnDisable()
See MonoBehaviour.
Declaration
protected void OnDisable()
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()
Update()
See MonoBehaviour.
Declaration
protected void Update()