docs.unity3d.com
    Show / Hide Table of Contents

    Struct PoseState

    State layout for a single pose.

    Namespace: UnityEngine.InputSystem.XR
    Syntax
    public struct PoseState : IInputStateTypeInfo
    Remarks

    This is the low-level memory representation of a single pose, i.e the way poses are internally transmitted and stored in the system. PoseStates are used on devices containing PoseControls.

    Constructors

    PoseState(Boolean, XR.InputTrackingState, Vector3, Quaternion, Vector3, Vector3)

    Constructor for PoseStates.

    Useful for creating PoseStates locally (not from PoseControl).

    Declaration
    public PoseState(bool isTracked, XR.InputTrackingState trackingState, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 angularVelocity)
    Parameters
    Type Name Description
    Boolean isTracked

    Value to use for isTracked

    XR.InputTrackingState trackingState

    Value to use for trackingState

    Vector3 position

    Value to use for position

    Quaternion rotation

    Value to use for rotation

    Vector3 velocity

    Value to use for velocity

    Vector3 angularVelocity

    Value to use for angularVelocity

    Fields

    angularVelocity

    The angular velocity in 3D space, relative to the tracking origin where this pose represents.

    Declaration
    public Vector3 angularVelocity
    Field Value
    Type Description
    Vector3
    Remarks

    This field is only valid if trackingState contains the value. See for information on tracking origins.

    isTracked

    Whether the pose is currently being fully tracked. Otherwise, the tracking is either unavailable, or simulated.

    Declaration
    public bool isTracked
    Field Value
    Type Description
    Boolean
    Remarks

    Fully tracked means that the pose is accurate and not using any simulated or extrapolated positions, and the system tracking this pose is able to confidently track this object.

    position

    The position in 3D space, relative to the tracking origin where this pose represents.

    Declaration
    public Vector3 position
    Field Value
    Type Description
    Vector3
    Remarks

    Positions are represented in meters. This field is only valid if trackingState contains the value. See for information on tracking origins.

    rotation

    The rotation in 3D space, relative to the tracking origin where this pose represents.

    Declaration
    public Quaternion rotation
    Field Value
    Type Description
    Quaternion
    Remarks

    This field is only valid if trackingState contains the value. See for information on tracking origins.

    trackingState

    A Flags Enumeration specifying which other fields in the pose state are valid.

    Declaration
    public XR.InputTrackingState trackingState
    Field Value
    Type Description
    XR.InputTrackingState

    velocity

    The velocity in 3D space, relative to the tracking origin where this pose represents.

    Declaration
    public Vector3 velocity
    Field Value
    Type Description
    Vector3
    Remarks

    Velocities are represented in meters per second. This field is only valid if trackingState contains the value. See for information on tracking origins.

    Properties

    format

    Memory format tag for PoseState.

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

    Returns "Pose".

    Implements
    IInputStateTypeInfo.format
    See Also
    format

    See Also

    PoseControl
    In This Article
    • Constructors
      • PoseState(Boolean, XR.InputTrackingState, Vector3, Quaternion, Vector3, Vector3)
    • Fields
      • angularVelocity
      • isTracked
      • position
      • rotation
      • trackingState
      • velocity
    • Properties
      • format
    • See Also
    Back to top
    Terms of use
    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