docs.unity3d.com
    Show / Hide Table of Contents

    Class CameraOffsetProvider

    Inheritance
    Object
    CameraOffsetProvider
    Namespace: Unity.MARS.Providers
    Syntax
    public class CameraOffsetProvider : MonoBehaviour, IProvidesCameraOffset, IFunctionalityProvider

    Properties

    cameraPositionOffset

    Get or set the camera position offset

    Declaration
    public Vector3 cameraPositionOffset { get; set; }
    Property Value
    Type Description
    Vector3
    Implements
    IProvidesCameraOffset.cameraPositionOffset

    cameraScale

    Get or set the camera scale

    Declaration
    public float cameraScale { get; set; }
    Property Value
    Type Description
    Single
    Implements
    IProvidesCameraOffset.cameraScale

    cameraYawOffset

    Get or set the camera rotation offset

    Declaration
    public float cameraYawOffset { get; set; }
    Property Value
    Type Description
    Single
    Implements
    IProvidesCameraOffset.cameraYawOffset

    Explicit Interface Implementations

    IProvidesCameraOffset.ApplyInverseOffsetToDirection(Vector3)

    Apply the inverse of the camera offset to a direction and return the modified direction. This is not affected by scale or position.

    Declaration
    Vector3 IProvidesCameraOffset.ApplyInverseOffsetToDirection(Vector3 direction)
    Parameters
    Type Name Description
    Vector3 direction

    The direction to which the offset will be applied

    Returns
    Type Description
    Vector3

    The modified direction

    Implements
    IProvidesCameraOffset.ApplyInverseOffsetToDirection(Vector3)

    IProvidesCameraOffset.ApplyInverseOffsetToPose(Pose)

    Apply the inverse of the camera offset to a pose and return the modified pose

    Declaration
    Pose IProvidesCameraOffset.ApplyInverseOffsetToPose(Pose pose)
    Parameters
    Type Name Description
    Pose pose

    The pose to which the offset will be applied

    Returns
    Type Description
    Pose

    The modified pose

    Implements
    IProvidesCameraOffset.ApplyInverseOffsetToPose(Pose)

    IProvidesCameraOffset.ApplyInverseOffsetToPosition(Vector3)

    Apply the inverse of the camera offset to a position and return the modified position

    Declaration
    Vector3 IProvidesCameraOffset.ApplyInverseOffsetToPosition(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position to which the offset will be applied

    Returns
    Type Description
    Vector3

    The modified position

    Implements
    IProvidesCameraOffset.ApplyInverseOffsetToPosition(Vector3)

    IProvidesCameraOffset.ApplyInverseOffsetToRotation(Quaternion)

    Apply the inverse of the camera offset to a rotation and return the modified rotation

    Declaration
    Quaternion IProvidesCameraOffset.ApplyInverseOffsetToRotation(Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The rotation to which the offset will be applied

    Returns
    Type Description
    Quaternion

    The modified rotation

    Implements
    IProvidesCameraOffset.ApplyInverseOffsetToRotation(Quaternion)

    IProvidesCameraOffset.ApplyOffsetToDirection(Vector3)

    Apply the camera offset to a direction and return the modified direction. This is not affected by scale or position.

    Declaration
    Vector3 IProvidesCameraOffset.ApplyOffsetToDirection(Vector3 direction)
    Parameters
    Type Name Description
    Vector3 direction

    The direction to which the offset will be applied

    Returns
    Type Description
    Vector3

    The modified direction

    Implements
    IProvidesCameraOffset.ApplyOffsetToDirection(Vector3)

    IProvidesCameraOffset.ApplyOffsetToPose(Pose)

    Apply the camera offset to a pose and return the modified pose

    Declaration
    Pose IProvidesCameraOffset.ApplyOffsetToPose(Pose pose)
    Parameters
    Type Name Description
    Pose pose

    The pose to which the offset will be applied

    Returns
    Type Description
    Pose

    The modified pose

    Implements
    IProvidesCameraOffset.ApplyOffsetToPose(Pose)

    IProvidesCameraOffset.ApplyOffsetToPosition(Vector3)

    Apply the camera offset to a position and return the modified position

    Declaration
    Vector3 IProvidesCameraOffset.ApplyOffsetToPosition(Vector3 position)
    Parameters
    Type Name Description
    Vector3 position

    The position to which the offset will be applied

    Returns
    Type Description
    Vector3

    The modified position

    Implements
    IProvidesCameraOffset.ApplyOffsetToPosition(Vector3)

    IProvidesCameraOffset.ApplyOffsetToRotation(Quaternion)

    Apply the camera offset to a rotation and return the modified rotation

    Declaration
    Quaternion IProvidesCameraOffset.ApplyOffsetToRotation(Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The rotation to which the offset will be applied

    Returns
    Type Description
    Quaternion

    The modified rotation

    Implements
    IProvidesCameraOffset.ApplyOffsetToRotation(Quaternion)

    IProvidesCameraOffset.CameraOffsetMatrix

    Get the matrix that applies the camera offset transformation

    Declaration
    Matrix4x4 IProvidesCameraOffset.CameraOffsetMatrix { get; }
    Returns
    Type Description
    Matrix4x4
    Implements
    IProvidesCameraOffset.CameraOffsetMatrix
    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