docs.unity3d.com
    Show / Hide Table of Contents

    Class SectorInteraction

    Interaction that performs the action if the control is pushed into a slice of a circle along cardinal directions, with a deadzone center magnitude. Typically used to define actions for North, South, East, or West for a thumbstick.

    Inheritance
    Object
    SectorInteraction
    Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Interactions
    Syntax
    public class SectorInteraction : IInputInteraction<Vector2>
    Remarks

    The interaction performs the action if the control crosses the center threshold defined by pressPoint and it is in a direction matching directions. Whether the action cancels or performs when leaving or re-entering each direction sector depends on the configured sweepBehavior. Once the control returns to center as defined by the center threshold, the action cancels.

    Fields

    directions

    Determines cardinal direction(s) that the action should perform when crossing the press threshold towards.

    Declaration
    public SectorInteraction.Directions directions
    Field Value
    Type Description
    SectorInteraction.Directions

    pressPoint

    Magnitude threshold that must be crossed by an actuated control for the control to be considered pressed.

    Declaration
    public float pressPoint
    Field Value
    Type Description
    Single
    Remarks

    If this is less than or equal to 0 (the default), defaultPressPoint is used instead.

    sweepBehavior

    Determines when the action should perform or cancel when sweeping the stick around the cardinal directions without returning to center.

    Declaration
    public SectorInteraction.SweepBehavior sweepBehavior
    Field Value
    Type Description
    SectorInteraction.SweepBehavior

    Properties

    defaultPressPoint

    The default magnitude threshold that must be crossed by an actuated control for the control to be considered pressed.

    Declaration
    public static float defaultPressPoint { get; set; }
    Property Value
    Type Description
    Single

    Methods

    Process(ref InputInteractionContext)

    Declaration
    public void Process(ref InputInteractionContext context)
    Parameters
    Type Name Description
    InputInteractionContext context

    Reset()

    Declaration
    public void Reset()
    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