docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRPokeInteractor

    Interactor used for interacting with interactables through poking.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    XRBaseInteractor
    XRPokeInteractor
    Implements
    IXRHoverInteractor
    IXRSelectInteractor
    IXRTargetPriorityInteractor
    IXRGroupMember
    IXRInteractionStrengthInteractor
    IXRInteractor
    IUIHoverInteractor
    IUIInteractor
    IPokeStateDataProvider
    IAttachPointVelocityProvider
    Inherited Members
    XRBaseInteractor.registered
    XRBaseInteractor.unregistered
    XRBaseInteractor.interactionManager
    XRBaseInteractor.containingGroup
    XRBaseInteractor.interactionLayers
    XRBaseInteractor.handedness
    XRBaseInteractor.attachTransform
    XRBaseInteractor.keepSelectedTargetValid
    XRBaseInteractor.disableVisualsWhenBlockedInGroup
    XRBaseInteractor.startingSelectedInteractable
    XRBaseInteractor.startingTargetFilter
    XRBaseInteractor.hoverEntered
    XRBaseInteractor.hoverExited
    XRBaseInteractor.selectEntered
    XRBaseInteractor.selectExited
    XRBaseInteractor.targetFilter
    XRBaseInteractor.allowHover
    XRBaseInteractor.allowSelect
    XRBaseInteractor.isPerformingManualInteraction
    XRBaseInteractor.interactablesHovered
    XRBaseInteractor.hasHover
    XRBaseInteractor.interactablesSelected
    XRBaseInteractor.firstInteractableSelected
    XRBaseInteractor.hasSelection
    XRBaseInteractor.startingHoverFilters
    XRBaseInteractor.hoverFilters
    XRBaseInteractor.startingSelectFilters
    XRBaseInteractor.selectFilters
    XRBaseInteractor.largestInteractionStrength
    XRBaseInteractor.Reset()
    XRBaseInteractor.Start()
    XRBaseInteractor.OnDestroy()
    XRBaseInteractor.GetAttachTransform(IXRInteractable)
    XRBaseInteractor.GetAttachPoseOnSelect(IXRSelectInteractable)
    XRBaseInteractor.GetLocalAttachPoseOnSelect(IXRSelectInteractable)
    XRBaseInteractor.isHoverActive
    XRBaseInteractor.isSelectActive
    XRBaseInteractor.targetPriorityMode
    XRBaseInteractor.targetsForSelection
    XRBaseInteractor.CanHover(IXRHoverInteractable)
    XRBaseInteractor.CanSelect(IXRSelectInteractable)
    XRBaseInteractor.IsHovering(IXRHoverInteractable)
    XRBaseInteractor.IsSelecting(IXRSelectInteractable)
    XRBaseInteractor.IsHovering(IXRInteractable)
    XRBaseInteractor.IsSelecting(IXRInteractable)
    XRBaseInteractor.selectedInteractableMovementTypeOverride
    XRBaseInteractor.CaptureAttachPose(IXRSelectInteractable)
    XRBaseInteractor.CreateAttachTransform()
    XRBaseInteractor.GetInteractionStrength(IXRInteractable)
    XRBaseInteractor.OnRegistered(InteractorRegisteredEventArgs)
    XRBaseInteractor.OnUnregistered(InteractorUnregisteredEventArgs)
    XRBaseInteractor.OnHoverEntered(HoverEnterEventArgs)
    XRBaseInteractor.OnHoverExiting(HoverExitEventArgs)
    XRBaseInteractor.OnHoverExited(HoverExitEventArgs)
    XRBaseInteractor.OnSelectEntering(SelectEnterEventArgs)
    XRBaseInteractor.OnSelectEntered(SelectEnterEventArgs)
    XRBaseInteractor.OnSelectExiting(SelectExitEventArgs)
    XRBaseInteractor.OnSelectExited(SelectExitEventArgs)
    XRBaseInteractor.ProcessInteractionStrength(XRInteractionUpdateOrder.UpdatePhase)
    XRBaseInteractor.StartManualInteraction(IXRSelectInteractable)
    XRBaseInteractor.EndManualInteraction()
    XRBaseInteractor.ProcessHoverFilters(IXRHoverInteractable)
    XRBaseInteractor.ProcessSelectFilters(IXRSelectInteractable)
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
    [AddComponentMenu("XR/Interactors/XR Poke Interactor", 11)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Interactors.XRPokeInteractor.html")]
    public class XRPokeInteractor : XRBaseInteractor, IXRHoverInteractor, IXRSelectInteractor, IXRTargetPriorityInteractor, IXRGroupMember, IXRInteractionStrengthInteractor, IXRInteractor, IUIHoverInteractor, IUIInteractor, IPokeStateDataProvider, IAttachPointVelocityProvider

    Properties

    attachPointVelocityTracker

    The tracker used to compute the velocity of the attach point. This behavior automatically updates this velocity tracker each frame during PreprocessInteractor(UpdatePhase).

    Declaration
    protected IAttachPointVelocityTracker attachPointVelocityTracker { get; set; }
    Property Value
    Type Description
    IAttachPointVelocityTracker
    See Also
    GetAttachPointVelocity()
    GetAttachPointAngularVelocity()

    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.

    Declaration
    public bool debugVisualizationsEnabled { get; set; }
    Property Value
    Type Description
    bool
    See Also
    XRPokeFilter

    enableUIInteraction

    Gets or sets whether this Interactor is able to affect UI.

    Declaration
    public bool enableUIInteraction { get; set; }
    Property Value
    Type Description
    bool
    See Also
    XRPokeFilter

    physicsLayerMask

    Physics layer mask used for limiting poke sphere overlap.

    Declaration
    public LayerMask physicsLayerMask { get; set; }
    Property Value
    Type Description
    LayerMask
    See Also
    XRPokeFilter

    physicsTriggerInteraction

    Determines whether the poke sphere overlap will hit triggers.

    Declaration
    public QueryTriggerInteraction physicsTriggerInteraction { get; set; }
    Property Value
    Type Description
    QueryTriggerInteraction
    Remarks

    When set to UseGlobal, the value of Queries Hit Triggers (queriesHitTriggers) in Edit > Project Settings > Physics will be used.

    See Also
    XRPokeFilter

    pokeDepth

    The depth threshold within which an interaction can begin to be evaluated as a poke.

    Declaration
    public float pokeDepth { get; set; }
    Property Value
    Type Description
    float
    See Also
    XRPokeFilter

    pokeHoverRadius

    The radius threshold within which an interaction can be evaluated as a poke hover.

    Declaration
    public float pokeHoverRadius { get; set; }
    Property Value
    Type Description
    float
    See Also
    XRPokeFilter

    pokeInteractionOffset

    Distance along the poke interactable interaction axis that allows for a poke to be triggered sooner/with less precision.

    Declaration
    public float pokeInteractionOffset { get; set; }
    Property Value
    Type Description
    float
    See Also
    XRPokeFilter

    pokeSelectWidth

    The width threshold within which an interaction can be evaluated as a poke select.

    Declaration
    public float pokeSelectWidth { get; set; }
    Property Value
    Type Description
    float
    See Also
    XRPokeFilter

    pokeStateData

    Unity.XR.CoreUtils.Bindings.Variables.IReadOnlyBindableVariable<T> that updates whenever the poke logic state is evaluated.

    Declaration
    public IReadOnlyBindableVariable<PokeStateData> pokeStateData { get; }
    Property Value
    Type Description
    IReadOnlyBindableVariable<PokeStateData>
    See Also
    PokeStateData

    pokeWidth

    The width threshold within which an interaction can begin to be evaluated as a poke.

    Declaration
    public float pokeWidth { get; set; }
    Property Value
    Type Description
    float
    See Also
    XRPokeFilter

    requirePokeFilter

    Denotes whether or not valid targets will only include objects with a poke filter.

    Declaration
    public bool requirePokeFilter { get; set; }
    Property Value
    Type Description
    bool
    See Also
    XRPokeFilter

    uiHoverEntered

    The event that is called when the Interactor begins hovering over a UI element.

    Declaration
    public UIHoverEnterEvent uiHoverEntered { get; set; }
    Property Value
    Type Description
    UIHoverEnterEvent
    Remarks

    The UIHoverEventArgs passed to each listener is only valid while the event is invoked, do not hold a reference to it.

    See Also
    XRPokeFilter

    uiHoverExited

    The event that is called when this Interactor ends hovering over a UI element.

    Declaration
    public UIHoverExitEvent uiHoverExited { get; set; }
    Property Value
    Type Description
    UIHoverExitEvent
    Remarks

    The UIHoverEventArgs passed to each listener is only valid while the event is invoked, do not hold a reference to it.

    See Also
    XRPokeFilter

    Methods

    Awake()

    See MonoBehaviour.

    Declaration
    protected override void Awake()
    Overrides
    XRBaseInteractor.Awake()
    See Also
    XRPokeFilter

    GetAttachPointAngularVelocity()

    Last computed default attach point angular velocity, based on multi-frame sampling of the pose in world space.

    Declaration
    public Vector3 GetAttachPointAngularVelocity()
    Returns
    Type Description
    Vector3

    Returns the transformed attach point angular velocity.

    See Also
    GetAttachPointVelocity()

    GetAttachPointVelocity()

    Last computed default attach point velocity, based on multi-frame sampling of the pose in world space.

    Declaration
    public Vector3 GetAttachPointVelocity()
    Returns
    Type Description
    Vector3

    Returns the transformed attach point linear velocity.

    See Also
    GetAttachPointAngularVelocity()

    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
    XRBaseInteractor.GetValidTargets(List<IXRInteractable>)
    Remarks

    When implementing this method, Unity expects you to clear targets before adding to it.

    See Also
    XRPokeFilter

    OnDisable()

    See MonoBehaviour.

    Declaration
    protected override void OnDisable()
    Overrides
    XRBaseInteractor.OnDisable()
    See Also
    XRPokeFilter

    OnEnable()

    See MonoBehaviour.

    Declaration
    protected override void OnEnable()
    Overrides
    XRBaseInteractor.OnEnable()
    See Also
    XRPokeFilter

    OnHoverEntering(HoverEnterEventArgs)

    The XRInteractionManager calls this method right before the Interactor first initiates hovering over an Interactable in a first pass.

    Declaration
    protected override void OnHoverEntering(HoverEnterEventArgs args)
    Parameters
    Type Name Description
    HoverEnterEventArgs args

    Event data containing the Interactable that is being hovered over.

    Overrides
    XRBaseInteractor.OnHoverEntering(HoverEnterEventArgs)
    Remarks

    args is only valid during this method call, do not hold a reference to it.

    See Also
    OnHoverEntered(HoverEnterEventArgs)

    OnUIHoverEntered(UIHoverEventArgs)

    The XRUIInputModule calls this method when the Interactor begins hovering over a UI element.

    Declaration
    protected virtual void OnUIHoverEntered(UIHoverEventArgs args)
    Parameters
    Type Name Description
    UIHoverEventArgs args

    Event data containing the UI element that is being hovered over.

    Remarks

    args is only valid during this method call, do not hold a reference to it.

    See Also
    OnUIHoverExited(UIHoverEventArgs)

    OnUIHoverExited(UIHoverEventArgs)

    The XRUIInputModule calls this method when the Interactor ends hovering over a UI element.

    Declaration
    protected virtual void OnUIHoverExited(UIHoverEventArgs args)
    Parameters
    Type Name Description
    UIHoverEventArgs args

    Event data containing the UI element that is no longer hovered over.

    Remarks

    args is only valid during this method call, do not hold a reference to it.

    See Also
    OnUIHoverEntered(UIHoverEventArgs)

    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.

    Declaration
    public override void PreprocessInteractor(XRInteractionUpdateOrder.UpdatePhase updatePhase)
    Parameters
    Type Name Description
    XRInteractionUpdateOrder.UpdatePhase updatePhase

    The update phase this is called during.

    Overrides
    XRBaseInteractor.PreprocessInteractor(XRInteractionUpdateOrder.UpdatePhase)
    Remarks

    Please see the XRInteractionManager and XRInteractionUpdateOrder.UpdatePhase documentation for more details on update order.

    See Also
    XRInteractionUpdateOrder.UpdatePhase

    ProcessInteractor(UpdatePhase)

    The XRInteractionManager or containing IXRInteractionGroup calls this method to update the Interactor after interaction events occur.

    Declaration
    public override void ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase updatePhase)
    Parameters
    Type Name Description
    XRInteractionUpdateOrder.UpdatePhase updatePhase

    The update phase this is called during.

    Overrides
    XRBaseInteractor.ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase)
    Remarks

    Please see the XRInteractionManager and XRInteractionUpdateOrder.UpdatePhase documentation for more details on update order.

    See Also
    XRInteractionUpdateOrder.UpdatePhase
    ProcessInteractable(UpdatePhase)

    TryGetUIModel(out TrackedDeviceModel)

    Attempts to retrieve the current UI Model.

    Declaration
    public bool TryGetUIModel(out TrackedDeviceModel model)
    Parameters
    Type Name Description
    TrackedDeviceModel model

    The returned model that reflects the UI state of this Interactor.

    Returns
    Type Description
    bool

    Returns true if the model was able to retrieved. Otherwise, returns false.

    See Also
    XRPokeFilter

    UpdateUIModel(ref TrackedDeviceModel)

    Updates the current UI Model to match the state of the Interactor.

    Declaration
    public virtual void UpdateUIModel(ref TrackedDeviceModel model)
    Parameters
    Type Name Description
    TrackedDeviceModel model

    The returned model that will match this Interactor.

    See Also
    XRPokeFilter

    Implements

    IXRHoverInteractor
    IXRSelectInteractor
    IXRTargetPriorityInteractor
    IXRGroupMember
    IXRInteractionStrengthInteractor
    IXRInteractor
    IUIHoverInteractor
    IUIInteractor
    IPokeStateDataProvider
    IAttachPointVelocityProvider

    Extension Methods

    AttachPointVelocityProviderExtensions.GetAttachPointAngularVelocity(IAttachPointVelocityProvider, Transform)
    AttachPointVelocityProviderExtensions.GetAttachPointVelocity(IAttachPointVelocityProvider, Transform)
    XRGroupMemberExtensions.GetTopLevelContainingGroup(IXRGroupMember)
    XRHoverInteractorExtensions.GetOldestInteractableHovered(IXRHoverInteractor)
    XRInteractorExtensions.IsBlockedByInteractionWithinGroup(IXRInteractor)
    XRSelectInteractorExtensions.GetOldestInteractableSelected(IXRSelectInteractor)

    See Also

    XRPokeFilter
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)