docs.unity3d.com
    目次を表示する/隠す

    Struct XRSimulatedControllerState

    State for input device representing a simulated XR handed controller.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation
    Syntax
    public struct XRSimulatedControllerState : IInputStateTypeInfo

    Fields

    batteryLevel

    Value representing the current battery life of this device.

    Declaration
    public float batteryLevel
    Field Value
    Type Description
    Single

    buttons

    All the buttons on this device.

    Declaration
    public ushort buttons
    Field Value
    Type Description
    UInt16

    devicePosition

    The position of the device.

    Declaration
    public Vector3 devicePosition
    Field Value
    Type Description
    Vector3

    deviceRotation

    The rotation of this device.

    Declaration
    public Quaternion deviceRotation
    Field Value
    Type Description
    Quaternion

    grip

    Represents the user's grip on the controller.

    Declaration
    public float grip
    Field Value
    Type Description
    Single

    isTracked

    Informs to the developer whether the device is currently being tracked.

    Declaration
    public bool isTracked
    Field Value
    Type Description
    Boolean

    primary2DAxis

    The primary touchpad or joystick on a device.

    Declaration
    public Vector2 primary2DAxis
    Field Value
    Type Description
    Vector2

    secondary2DAxis

    A secondary touchpad or joystick on a device.

    Declaration
    public Vector2 secondary2DAxis
    Field Value
    Type Description
    Vector2

    trackingState

    Represents the values being tracked for this device.

    Declaration
    public int trackingState
    Field Value
    Type Description
    Int32

    trigger

    A trigger-like control, pressed with the index finger.

    Declaration
    public float trigger
    Field Value
    Type Description
    Single

    Properties

    format

    See IInputStateTypeInfo.format.

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

    formatId

    Memory format identifier for XRSimulatedControllerState.

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

    Methods

    Reset()

    See MonoBehaviour.

    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
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)