Class XRHandTrackingEvents
Component that subscribes to hand tracking events from the XRHandSubsystem for a particular Handedness and sends UnityEvents for tracking updates.
Inherited Members
Namespace: UnityEngine.XR.Hands
Assembly: Unity.XR.Hands.dll
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.hands@1.5/api/UnityEngine.XR.Hands.XRHandTrackingEvents.html")]
public class XRHandTrackingEvents : MonoBehaviour
Properties
bindableHandIsTracked
Whether the hand is currently being tracked, stored as a bindable variable that can be subscribed to for value changes.
Declaration
public IReadOnlyBindableVariable<bool> bindableHandIsTracked { get; }
Property Value
Type | Description |
---|---|
IReadOnlyBindableVariable<bool> |
handIsTracked
Whether the hand is currently being tracked
Declaration
public bool handIsTracked { get; }
Property Value
Type | Description |
---|---|
bool |
handedness
The hand to track and send events for.
Declaration
public Handedness handedness { get; set; }
Property Value
Type | Description |
---|---|
Handedness |
jointsUpdated
Event that occurs when the joints of the hands have updated.
Declaration
public HandUpdatedEvent jointsUpdated { get; }
Property Value
Type | Description |
---|---|
HandUpdatedEvent |
Remarks
The XRHandJointsUpdatedEventArgs passed to each listener is only valid while the event is invoked, do not hold a reference to it.
poseUpdated
Event that occurs when the pose of the hands has updated.
Declaration
public UnityEvent<Pose> poseUpdated { get; }
Property Value
Type | Description |
---|---|
UnityEvent<Pose> |
rootPose
The root pose of the hand.
Declaration
public Pose rootPose { get; }
Property Value
Type | Description |
---|---|
Pose |
subsystem
The source of the hand tracking data.
Declaration
public XRHandSubsystem subsystem { get; }
Property Value
Type | Description |
---|---|
XRHandSubsystem |
trackingAcquired
Event that occurs when the hand tracking is acquired.
Declaration
public UnityEvent trackingAcquired { get; }
Property Value
Type | Description |
---|---|
UnityEvent |
trackingChanged
Event that occurs when the hand tracking is acquired (true) or lost (false).
Declaration
public UnityEvent<bool> trackingChanged { get; }
Property Value
Type | Description |
---|---|
UnityEvent<bool> |
trackingLost
Event that occurs when the hand tracking is lost.
Declaration
public UnityEvent trackingLost { get; }
Property Value
Type | Description |
---|---|
UnityEvent |
updateType
Which update type to send events for when the pose and joints are updated. This can be one or multiple options from XRHandSubsystem.UpdateType.
Declaration
public XRHandTrackingEvents.UpdateTypes updateType { get; set; }
Property Value
Type | Description |
---|---|
XRHandTrackingEvents.UpdateTypes |
See Also
Methods
OnDisable()
See MonoBehaviour.
Declaration
protected virtual void OnDisable()
Update()
See MonoBehaviour.
Declaration
protected virtual void Update()