Logo
 All Classes Files Functions Variables Enumerations
Public Attributes | List of all members
DynamicCamera.MoveSettings Class Reference

Public Attributes

MoveMode movementMode = MoveMode.Angular
float idealDistance = 10
float lowerDerivation = 2.5F
float upperDerivation = 5.0F
float minimumDistance = 0
float maximumDistance = 0
float moveSpeed = 1
RotationMode rotationMode = RotationMode.Interpolated
float rotationSpeed = 1

Detailed Description

This class is a wrapper for the movement settings of the camera

This is wrapped to make th inspector cleaner and easier to understand.

See Also
moveSettings

Member Data Documentation

float DynamicCamera.MoveSettings.idealDistance = 10

This is the distance the camera wants to be from the target.

This helps define the ideal position of the camera, in conjunction with ModeSettings.cameraMode. This is the distance of the ideal position from the main target.

Anomalous distances of zero and less than zero will have odd effects. If this is zero, the camera will want to be at mainTarget.position. If this is set to negative, the camera will malfunction and become unreliable. For this reason, idealDistance is capped at a minimum of zero.

Though this is a public variable, it is recommended that you use the setters and getters to access it, as it is cumbersome to access directly.

See Also
lowerDerivation
upperDerivation
minimumDistance
maximumDistance
GetIdealDistance
SetIdealDistance
float DynamicCamera.MoveSettings.lowerDerivation = 2.5F

This modifies the closest the camera is allowed to be to the target

This is not an absolute value, but a modifier of idealDistance. idealDistance - lowerDerivation is the closest the camera is allowed to be to the target. For example, if idealDistance is 10, and lowerDerivation is 2.5, the actual minimum distance is 7.5.

If the camera is too close, it will be forced to the closest possible position on the same direction vector it currently has to the mainTarget. If idealDistance is less than lowerDerivation, an error is reported and lowerDerivation is set to equal idealDistance. If lowerDerivation is negative, an error is recorded and the value is set to zero.

To find the actual minimum distance, use the Get/SetMininumDistance functions, or look at the corresponding public variable.

Though this is a public variable, it is recommended that you use the setters and getters to access it, as it is cumbersome to access directly.

See Also
idealDistance
upperDerivation
GetMinimumDistance
SetMinimumDistance
minimumDistance
SetLowerDerivation
GetLowerDerivation
float DynamicCamera.MoveSettings.maximumDistance = 0

This holds the maximum possible distance from the camera to the target.

This is a read-only value, and changing it directly will accompilish nothing. To set the absolute minimum distance, use the SetMaximumDistance function. This is used as a read-out for ease of debugging in the inspector.

See Also
SetMaximumDistance
GetMaximumDistance
idealDistance
float DynamicCamera.MoveSettings.minimumDistance = 0

This holds the minimum possible distance from the camera to the target.

This is a read-only value, and changing it directly will accompilish nothing. To set the absolute minimum distance, use the SetMinimumDistance function. This is used as a read-out for ease of debugging in the inspector.

See Also
SetMinimumDistance
GetMinimumDistance
idealDistance
MoveMode DynamicCamera.MoveSettings.movementMode = MoveMode.Angular

The current MoveMode of the camera

This variable stores which movement method the camera will employ. For full details on what these modes ae, consult the MoveMode documentation

Though this is a public variable, it is recommended that you use the setters and getters to access it, as it is cumbersome to access directly.

See Also
DynamicCamera.MoveMode
SetMovementMode
GetMovementMode
moveSpeed
float DynamicCamera.MoveSettings.moveSpeed = 1

This is the distance the camera can move in one second

The higher this value, the quicker the camera can move towards the desired camera angle. It is calculated with Time.deltaTime to ensure consistent speed.

If the movementMode is set to instant, the camera is simply set to the ideal position and this value is ignored.

Negative values are not allowed. A value of zero will result in a stationary camera.

Though this is a public variable, it is recommended that you use the setters and getters to access it, as it is cumbersome to access directly.

See Also
movementMode
DynamicCamera.MoveMode
RotationMode DynamicCamera.MoveSettings.rotationMode = RotationMode.Interpolated

This is the rotation mode of the camera

This value determines how the camera rotates to look at the target. Consult the RotationMode documentation for full details.

Though this is a public variable, it is recommended that you use the setters and getters to access it, as it is cumbersome to access directly.

See Also
DynamicCamera.RotationMode
rotationSpeed
GetRotationMode
SetRotationMode
float DynamicCamera.MoveSettings.rotationSpeed = 1

This is the speed at which the camera can rotate

This is the speed, in radians, at which the camera will rotate to look at the mainTarget. To do this Quaternion.Slerp is used.

If the rotationMode is set to INSTANT, the camera will instantly look at the mainTarget and this value will be ignored.

If the value is zero, the camera will not rotate to look at the target If the value can not be less than zero

Though this is a public variable, it is recommended that you use the setters and getters to access it, as it is cumbersome to access directly.

See Also
rotationMode
DynamicCamera.RotationMode
GetRotationSpeed
SetRotationSpeed
float DynamicCamera.MoveSettings.upperDerivation = 5.0F

This modifies the farthest the camera is allowed to be from the target

This is not an absolute value, but a modifier of idealDistance. idealDistance + upperDerivation is the closest the camera is allowed to be to the target. For example, if idealDistance is 10, and upperDerivation is 2.5, the actual minimum distance is 12.5.

If the upperDerivation is negative, an error is recorded and the value is set to zero.

If the camera is too far, it will be forced to the farthest allowed position on the same direction vector it currently has to the mainTarget.

To find the actual maximum distance, use the Get/SetMaximumDistance functions, or look at the corresponding public variable.

Though this is a public variable, it is recommended that you use the setters and getters to access it, as it is cumbersome to access directly.

See Also
idealDistance
upperDerivation
maximumDistance
GetMinimumDistance
SetMinimumDistance
SetLowerDerivation
GetLowerDerivation

The documentation for this class was generated from the following file: