docs.unity3d.com
    Show / Hide Table of Contents

    Class XRPokeInteractor

    Interactor used for interacting with interactables through poking.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    XRBaseInteractor
    XRPokeInteractor
    Inherited Members
    XRBaseInteractor.registered
    XRBaseInteractor.unregistered
    XRBaseInteractor.interactionManager
    XRBaseInteractor.containingGroup
    XRBaseInteractor.interactionLayers
    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.GetAttachTransform(IXRInteractable)
    XRBaseInteractor.GetAttachPoseOnSelect(IXRSelectInteractable)
    XRBaseInteractor.GetLocalAttachPoseOnSelect(IXRSelectInteractable)
    XRBaseInteractor.isHoverActive
    XRBaseInteractor.isSelectActive
    XRBaseInteractor.targetPriorityMode
    XRBaseInteractor.targetsForSelection
    XRBaseInteractor.CanHover(IXRHoverInteractable)
    XRBaseInteractor.IsHovering(IXRHoverInteractable)
    XRBaseInteractor.IsSelecting(IXRSelectInteractable)
    XRBaseInteractor.IsHovering(IXRInteractable)
    XRBaseInteractor.IsSelecting(IXRInteractable)
    XRBaseInteractor.selectedInteractableMovementTypeOverride
    XRBaseInteractor.CaptureAttachPose(IXRSelectInteractable)
    XRBaseInteractor.GetInteractionStrength(IXRInteractable)
    XRBaseInteractor.IXRInteractionStrengthInteractor.ProcessInteractionStrength(XRInteractionUpdateOrder.UpdatePhase)
    XRBaseInteractor.IXRInteractor.OnRegistered(InteractorRegisteredEventArgs)
    XRBaseInteractor.IXRInteractor.OnUnregistered(InteractorUnregisteredEventArgs)
    XRBaseInteractor.IXRHoverInteractor.CanHover(IXRHoverInteractable)
    XRBaseInteractor.IXRHoverInteractor.OnHoverEntering(HoverEnterEventArgs)
    XRBaseInteractor.IXRHoverInteractor.OnHoverEntered(HoverEnterEventArgs)
    XRBaseInteractor.IXRHoverInteractor.OnHoverExiting(HoverExitEventArgs)
    XRBaseInteractor.IXRHoverInteractor.OnHoverExited(HoverExitEventArgs)
    XRBaseInteractor.IXRSelectInteractor.CanSelect(IXRSelectInteractable)
    XRBaseInteractor.IXRSelectInteractor.OnSelectEntering(SelectEnterEventArgs)
    XRBaseInteractor.IXRSelectInteractor.OnSelectEntered(SelectEnterEventArgs)
    XRBaseInteractor.IXRSelectInteractor.OnSelectExiting(SelectExitEventArgs)
    XRBaseInteractor.IXRSelectInteractor.OnSelectExited(SelectExitEventArgs)
    XRBaseInteractor.OnRegistered(InteractorRegisteredEventArgs)
    XRBaseInteractor.OnUnregistered(InteractorUnregisteredEventArgs)
    XRBaseInteractor.OnHoverEntering(HoverEnterEventArgs)
    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)
    XRBaseInteractor.IXRGroupMember.OnRegisteringAsGroupMember(IXRInteractionGroup)
    XRBaseInteractor.IXRGroupMember.OnRegisteringAsNonGroupMember()
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    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, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, Boolean)
    Component.GetComponentInParent(Type)
    UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, 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, Boolean)
    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, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindFirstObjectByType<T>()
    UnityEngine.Object.FindAnyObjectByType<T>()
    UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
    UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    [AddComponentMenu("XR/XR Poke Interactor", 11)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.3/api/UnityEngine.XR.Interaction.Toolkit.XRPokeInteractor.html")]
    public class XRPokeInteractor : XRBaseInteractor, IXRHoverInteractor, IXRSelectInteractor, IXRTargetPriorityInteractor, IXRGroupMember, IXRInteractionStrengthInteractor, IXRInteractor, IUIInteractor

    Properties

    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
    Boolean

    enableUIInteraction

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

    Declaration
    public bool enableUIInteraction { get; set; }
    Property Value
    Type Description
    Boolean

    physicsLayerMask

    Physics layer mask used for limiting poke sphere overlap.

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

    physicsTriggerInteraction

    Determines whether the poke sphere overlap will hit triggers.

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

    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
    Single

    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
    Single

    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
    Single

    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
    Single

    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
    Single

    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
    Boolean

    Methods

    Awake()

    See MonoBehaviour.

    Declaration
    protected override void Awake()
    Overrides
    XRBaseInteractor.Awake()

    CanSelect(IXRSelectInteractable)

    Determines if the Interactable is valid for selection this frame.

    Declaration
    public override bool CanSelect(IXRSelectInteractable interactable)
    Parameters
    Type Name Description
    IXRSelectInteractable interactable

    Interactable to check.

    Returns
    Type Description
    Boolean

    Returns true if the Interactable can be selected this frame.

    Overrides
    XRBaseInteractor.CanSelect(IXRSelectInteractable)
    See Also
    IsSelectableBy(IXRSelectInteractor)

    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.

    OnDestroy()

    See MonoBehaviour.

    Declaration
    protected override void OnDestroy()
    Overrides
    XRBaseInteractor.OnDestroy()

    OnDisable()

    See MonoBehaviour.

    Declaration
    protected override void OnDisable()
    Overrides
    XRBaseInteractor.OnDisable()

    OnEnable()

    See MonoBehaviour.

    Declaration
    protected override void OnEnable()
    Overrides
    XRBaseInteractor.OnEnable()

    PreprocessInteractor(XRInteractionUpdateOrder.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(XRInteractionUpdateOrder.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(XRInteractionUpdateOrder.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
    Boolean

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

    Implements
    IUIInteractor.TryGetUIModel(out TrackedDeviceModel)

    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.

    Implements
    IUIInteractor.UpdateUIModel(ref TrackedDeviceModel)

    Extension Methods

    XRGroupMemberExtensions.GetTopLevelContainingGroup(IXRGroupMember)
    XRHoverInteractorExtensions.GetOldestInteractableHovered(IXRHoverInteractor)
    XRInteractorExtensions.IsBlockedByInteractionWithinGroup(IXRInteractor)
    XRSelectInteractorExtensions.GetOldestInteractableSelected(IXRSelectInteractor)

    See Also

    XRPokeFilter
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023