Class ClimbTeleportInteractor
Interactor that drives climb locomotion assistance via teleportation. This interactor responds to the user grabbing a ClimbInteractable that references the same ClimbProvider as this interactor.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion.Climbing
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/Locomotion/Climb Teleport Interactor", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.Climbing.ClimbTeleportInteractor.html")]
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public class ClimbTeleportInteractor : XRBaseInteractor, IXRHoverInteractor, IXRSelectInteractor, IXRTargetPriorityInteractor, IXRGroupMember, IXRInteractionStrengthInteractor, IXRActivateInteractor, IXRInteractor
Remarks
If the climb interactable's climbAssistanceTeleportVolume is not null, the interactor will hover the teleport volume while the user is grabbing the climb interactable, otherwise the interactor will do nothing. When climb locomotion ends, the interactor will trigger teleportation to the evaluated destination by starting and immediately ending either a select or activate interaction, depending on the teleport volume's teleportTrigger. The interactor will also stop hovering the teleport volume the next frame after teleporting.
Properties
climbProvider
The climb locomotion provider to query for active locomotion and climbed interactable.
Declaration
public ClimbProvider climbProvider { get; set; }
Property Value
Type | Description |
---|---|
ClimbProvider |
destinationEvaluationSettings
Optional settings for how the hovered teleport volume evaluates a destination anchor. Applies as an override to the destinationEvaluationSettings of the climbed interactable's climbAssistanceTeleportVolume if Unity.XR.CoreUtils.Datums.DatumProperty<TValue, TDatum>.Value is not null.
Declaration
public TeleportVolumeDestinationSettingsDatumProperty destinationEvaluationSettings { get; set; }
Property Value
Type | Description |
---|---|
TeleportVolumeDestinationSettingsDatumProperty |
isSelectActive
(Read Only) Indicates whether this Interactor is in a state where it could select.
Declaration
public override bool isSelectActive { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
shouldActivate
(Read Only) Indicates whether this interactor is in a state where it should send the activate event this frame.
Declaration
public bool shouldActivate { get; }
Property Value
Type | Description |
---|---|
bool |
shouldDeactivate
(Read Only) Indicates whether this interactor is in a state where it should send the deactivate event this frame.
Declaration
public bool shouldDeactivate { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
GetActivateTargets(List<IXRActivateInteractable>)
Retrieve the list of Interactables that this Interactor could possibly activate or deactivate this frame.
Declaration
public void GetActivateTargets(List<IXRActivateInteractable> targets)
Parameters
Type | Name | Description |
---|---|---|
List<IXRActivateInteractable> | targets | The results list to populate with Interactables that are valid for activate or deactivate. |
Remarks
When implementing this method, Unity expects you to clear targets
before adding to it.
GetValidTargets(List<IXRInteractable>)
Retrieve the list of Interactables that this Interactor could possibly interact with this frame. This list is sorted by priority (with highest priority first).
Declaration
public override void GetValidTargets(List<IXRInteractable> targets)
Parameters
Type | Name | Description |
---|---|---|
List<IXRInteractable> | targets | The results list to populate with Interactables that are valid for selection or hover. |
Overrides
Remarks
When implementing this method, Unity expects you to clear targets
before adding to it.
OnDisable()
See MonoBehaviour.
Declaration
protected override void OnDisable()
Overrides
OnEnable()
See MonoBehaviour.
Declaration
protected override void OnEnable()