Struct XRSimulatedControllerState | XR Interaction Toolkit | 0.10.0-preview.7
docs.unity3d.com
    Show / Hide Table of Contents

    Struct XRSimulatedControllerState

    Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation
    Syntax
    public struct XRSimulatedControllerState : IInputStateTypeInfo

    Fields

    batteryLevel

    Declaration
    public float batteryLevel
    Field Value
    Type Description
    Single

    buttons

    Declaration
    public ushort buttons
    Field Value
    Type Description
    UInt16

    devicePosition

    Declaration
    public Vector3 devicePosition
    Field Value
    Type Description
    Vector3

    deviceRotation

    Declaration
    public Quaternion deviceRotation
    Field Value
    Type Description
    Quaternion

    grip

    Declaration
    public float grip
    Field Value
    Type Description
    Single

    isTracked

    Declaration
    public bool isTracked
    Field Value
    Type Description
    Boolean

    primary2DAxis

    Declaration
    public Vector2 primary2DAxis
    Field Value
    Type Description
    Vector2

    secondary2DAxis

    Declaration
    public Vector2 secondary2DAxis
    Field Value
    Type Description
    Vector2

    trackingState

    Declaration
    public int trackingState
    Field Value
    Type Description
    Int32

    trigger

    Declaration
    public float trigger
    Field Value
    Type Description
    Single

    Properties

    format

    Declaration
    public FourCC format { get; }
    Property Value
    Type Description
    FourCC
    Implements
    IInputStateTypeInfo.format

    formatId

    Memory format identifier for XRSimulatedControllerState.

    Declaration
    public static FourCC formatId { get; }
    Property Value
    Type Description
    FourCC
    See Also
    format

    Methods

    Reset()

    Declaration
    public void Reset()

    WithButton(ControllerButton, Boolean)

    Set the button mask for the given button.

    Declaration
    public XRSimulatedControllerState WithButton(ControllerButton button, bool state = true)
    Parameters
    Type Name Description
    ControllerButton button

    Button whose state to set.

    Boolean state

    Whether to set the bit on or off.

    Returns
    Type Description
    XRSimulatedControllerState

    The same XRSimulatedControllerState with the change applied.

    See Also
    buttons
    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