Class XRPokeInteractor
Interactor used for interacting with interactables through poking.
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/XR Poke Interactor", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.XRPokeInteractor.html")]
public class XRPokeInteractor : XRBaseInteractor, IXRHoverInteractor, IXRSelectInteractor, IXRTargetPriorityInteractor, IXRGroupMember, IXRInteractionStrengthInteractor, IXRInteractor, IUIHoverInteractor, IUIInteractor, IPokeStateDataProvider, IAttachPointVelocityProvider
Properties
| Name | Description |
|---|---|
| attachPointVelocityTracker | The tracker used to compute the velocity of the attach point. This behavior automatically updates this velocity tracker each frame during PreprocessInteractor(UpdatePhase). |
| debugVisualizationsEnabled | Denotes whether or not debug visuals are enabled for this poke interactor. Debug visuals include two spheres to display whether or not hover and select colliders have collided. |
| enableUIInteraction | Gets or sets whether this Interactor is able to affect UI. |
| physicsLayerMask | Physics layer mask used for limiting poke sphere overlap. |
| physicsTriggerInteraction | Determines whether the poke sphere overlap will hit triggers. |
| pokeDepth | The depth threshold within which an interaction can begin to be evaluated as a poke. |
| pokeHoverRadius | The radius threshold within which an interaction can be evaluated as a poke hover. |
| pokeInteractionOffset | Distance along the poke interactable interaction axis that allows for a poke to be triggered sooner/with less precision. |
| pokeSelectWidth | The width threshold within which an interaction can be evaluated as a poke select. |
| pokeStateData | IReadOnlyBindableVariable<T> that updates whenever the poke logic state is evaluated. |
| pokeWidth | The width threshold within which an interaction can begin to be evaluated as a poke. |
| requirePokeFilter | Denotes whether or not valid targets will only include objects with a poke filter. |
| uiHoverEntered | The event that is called when the Interactor begins hovering over a UI element. |
| uiHoverExited | The event that is called when this Interactor ends hovering over a UI element. |
Methods
| Name | Description |
|---|---|
| Awake() | See MonoBehaviour. |
| CanSelect(IXRSelectInteractable) | Determines if the Interactable is valid for selection this frame. |
| GetAttachPointAngularVelocity() | Last computed default attach point angular velocity, based on multi-frame sampling of the pose in world space. |
| GetAttachPointVelocity() | Last computed default attach point velocity, based on multi-frame sampling of the pose in world space. |
| 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). |
| OnDisable() | See MonoBehaviour. |
| OnEnable() | See MonoBehaviour. |
| OnUIHoverEntered(UIHoverEventArgs) | The XRUIInputModule calls this method when the Interactor begins hovering over a UI element. |
| OnUIHoverExited(UIHoverEventArgs) | The XRUIInputModule calls this method when the Interactor ends hovering over a UI element. |
| PreprocessInteractor(UpdatePhase) | The XRInteractionManager or containing IXRInteractionGroup calls this method to update the Interactor before interaction events occur. Interactors should use this method to do tasks like determine their valid targets. |
| ProcessInteractor(UpdatePhase) | The XRInteractionManager or containing IXRInteractionGroup calls this method to update the Interactor after interaction events occur. |
| TryGetUIModel(out TrackedDeviceModel) | Attempts to retrieve the current UI Model. |
| UpdateUIModel(ref TrackedDeviceModel) | Updates the current UI Model to match the state of the Interactor. |