docs.unity3d.com
    Show / Hide Table of Contents

    Enum XRBaseControllerInteractor.InputTriggerType

    This defines the type of input that triggers an interaction.

    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public enum InputTriggerType

    Fields

    Name Description Value
    State

    Unity will consider the input active while the button is pressed. A user can hold the button before the interaction is possible and still trigger the interaction when it is possible.


    When multiple interactors select an interactable at the same time and that interactable's InteractableSelectMode is set to Single, you may experience undesired behavior of selection repeatedly passing between the interactors and the select interaction events firing each frame. State Change is the recommended and default option.

    0
    StateChange

    Unity will consider the input active only on the frame the button is pressed, and if successful remain engaged until the input is released. A user must press the button while the interaction is possible to trigger the interaction. They will not trigger the interaction if they started pressing the button before the interaction was possible.


    1
    Toggle

    The interaction starts on the frame the input is pressed and remains engaged until the second time the input is pressed.


    2
    Sticky

    The interaction starts on the frame the input is pressed and remains engaged until the second time the input is released.


    3
    See Also
    selectActionTrigger
    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