docs.unity3d.com
    Show / Hide Table of Contents

    Class QuaternionExtensions

    Extension methods for Quaternion structs.

    Inheritance
    Object
    QuaternionExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Syntax
    public static class QuaternionExtensions

    Methods

    ConstrainYaw(Quaternion)

    Returns a rotation that only contains the yaw component of the specified rotation. The resulting rotation is not normalized.

    Declaration
    public static Quaternion ConstrainYaw(this Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The source rotation.

    Returns
    Type Description
    Quaternion

    A yaw-only rotation that matches the input rotation's yaw.

    ConstrainYawNormalized(Quaternion)

    Returns a normalized rotation that only contains the yaw component of the specified rotation.

    Declaration
    public static Quaternion ConstrainYawNormalized(this Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The source rotation.

    Returns
    Type Description
    Quaternion

    A yaw-only rotation that matches the input rotation's yaw.

    ConstrainYawPitchNormalized(Quaternion)

    Returns a normalized rotation that only contains the yaw and pitch components of the specified rotation

    Declaration
    public static Quaternion ConstrainYawPitchNormalized(this Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The source rotation.

    Returns
    Type Description
    Quaternion

    A yaw- and pitch-only rotation that matches the input rotation's yaw and pitch.

    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