Class 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
cameraScale
Get or set the camera scale
Declaration
public float cameraScale { get; set; }
Property Value
Type | Description |
---|---|
Single |
Implements
cameraYawOffset
Get or set the camera rotation offset
Declaration
public float cameraYawOffset { get; set; }
Property Value
Type | Description |
---|---|
Single |
Implements
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.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.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.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.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.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.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.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.CameraOffsetMatrix
Get the matrix that applies the camera offset transformation
Declaration
Matrix4x4 IProvidesCameraOffset.CameraOffsetMatrix { get; }
Returns
Type | Description |
---|---|
Matrix4x4 |