Class IUsesCameraOffsetMethods
Namespace: Unity.MARS
Syntax
public static class IUsesCameraOffsetMethods
Methods
ApplyInverseOffsetToDirection(IUsesCameraOffset, 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
public static Vector3 ApplyInverseOffsetToDirection(this IUsesCameraOffset obj, Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Vector3 | direction | The direction to which the offset will be applied |
Returns
Type | Description |
---|---|
Vector3 | The modified direction |
ApplyInverseOffsetToPose(IUsesCameraOffset, Pose)
Apply the inverse of the camera offset to a pose and return the modified pose
Declaration
public static Pose ApplyInverseOffsetToPose(this IUsesCameraOffset obj, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Pose | pose | The pose to which the offset will be applied |
Returns
Type | Description |
---|---|
Pose | The modified pose |
ApplyInverseOffsetToPosition(IUsesCameraOffset, Vector3)
Apply the inverse of the camera offset to a pose and return the modified pose
Declaration
public static Vector3 ApplyInverseOffsetToPosition(this IUsesCameraOffset obj, Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Vector3 | position |
Returns
Type | Description |
---|---|
Vector3 | The modified pose |
ApplyInverseOffsetToRotation(IUsesCameraOffset, Quaternion)
Apply the inverse of the camera offset to a rotation and return the modified rotation
Declaration
public static Quaternion ApplyInverseOffsetToRotation(this IUsesCameraOffset obj, Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Quaternion | rotation | The rotation to which the offset will be applied |
Returns
Type | Description |
---|---|
Quaternion | The modified rotation |
ApplyOffsetToDirection(IUsesCameraOffset, Vector3)
Apply the camera offset to a direction and return the modified direction. This is not affected by scale or position.
Declaration
public static Vector3 ApplyOffsetToDirection(this IUsesCameraOffset obj, Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Vector3 | direction | The direction to which the offset will be applied |
Returns
Type | Description |
---|---|
Vector3 | The modified direction |
ApplyOffsetToPose(IUsesCameraOffset, Pose)
Apply the camera offset to a pose and return the modified pose
Declaration
public static Pose ApplyOffsetToPose(this IUsesCameraOffset obj, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Pose | pose | The pose to which the offset will be applied |
Returns
Type | Description |
---|---|
Pose | The modified pose |
ApplyOffsetToPosition(IUsesCameraOffset, Vector3)
Apply the camera offset to a position and return the modified position
Declaration
public static Vector3 ApplyOffsetToPosition(this IUsesCameraOffset obj, Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Vector3 | position | The position to which the offset will be applied |
Returns
Type | Description |
---|---|
Vector3 | The modified position |
ApplyOffsetToRotation(IUsesCameraOffset, Quaternion)
Apply the camera offset to a rotation and return the modified rotation
Declaration
public static Quaternion ApplyOffsetToRotation(this IUsesCameraOffset obj, Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Quaternion | rotation | The rotation to which the offset will be applied |
Returns
Type | Description |
---|---|
Quaternion | The modified rotation |
GetCameraOffsetMatrix(IUsesCameraOffset)
Get the matrix that applies the camera offset transformation
Declaration
public static Matrix4x4 GetCameraOffsetMatrix(this IUsesCameraOffset obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj |
Returns
Type | Description |
---|---|
Matrix4x4 | The camera offset matrix |
GetCameraPositionOffset(IUsesCameraOffset)
Get the camera position offset
Declaration
public static Vector3 GetCameraPositionOffset(this IUsesCameraOffset obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj |
Returns
Type | Description |
---|---|
Vector3 | The camera position offset |
GetCameraScale(IUsesCameraOffset)
Get the camera scale
Declaration
public static float GetCameraScale(this IUsesCameraOffset obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj |
Returns
Type | Description |
---|---|
Single | The camera scale |
GetCameraYawOffset(IUsesCameraOffset)
Get the camera yaw offset
Declaration
public static float GetCameraYawOffset(this IUsesCameraOffset obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj |
Returns
Type | Description |
---|---|
Single | The camera yaw offset |
SetCameraPositionOffset(IUsesCameraOffset, Vector3)
Set the camera position offset
Declaration
public static void SetCameraPositionOffset(this IUsesCameraOffset obj, Vector3 offset)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Vector3 | offset | The camera position offset |
SetCameraScale(IUsesCameraOffset, Single)
Set the camera scale
Declaration
public static void SetCameraScale(this IUsesCameraOffset obj, float scale)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Single | scale | The camera scale |
SetCameraYawOffset(IUsesCameraOffset, Single)
Set the camera yaw offset
Declaration
public static void SetCameraYawOffset(this IUsesCameraOffset obj, float offset)
Parameters
Type | Name | Description |
---|---|---|
IUsesCameraOffset | obj | |
Single | offset | The yaw offset |