Orbital Transposer
This Virtual Camera Body algorithm moves the Unity camera in a variable relationship to the Virtual Camera’s Follow target. It optionally accepts player input, which allows the player to dynamically control the position of the camera relative to the target.
The Orbital Transposer introduces the concept of heading, which is the direction in which the target is moving or facing. Orbital Transposer attempts to position the camera so that it points in the same direction as the heading direction. By default, this position is directly behind the target. Control this relationship by adjusting the Heading Bias property.
If you attach an input controller to the Orbital Transposer, then the player can also control the camera. This allows the player to move the camera to any spot on an orbit around the target. Configure the Orbital Transposer to take its input from any axis that you set up in the Input Manager. Or control the value directly using a custom input system.
Orbital Transposer optionally re-centers the camera automatically. When Recenter To Target Heading is checked, Orbital Transposer automatically moves the camera back to the target heading. You can specify the length of time to wait after it has detected no user input and the speed of the recentering.
Properties:
Property: | Function: | |
---|---|---|
Binding Mode | The coordinate space to use when interpreting the offset of the Virtual Camera from the Follow target. | |
Lock To Target On Assign | The target’s local frame at the moment when the Virtual Camera was activated, or when the target was assigned. | |
Lock To Target With World Up | The target’s local frame, with the tilt and roll reset to zero. | |
Lock To Target No Roll | The target’s local frame, with the roll reset to zero. | |
Lock To Target | The target’s local frame. | |
World Space | World space offset. | |
Simple Follow With World Up | Relative to the target, using camera-local axes. | |
Follow Offset | The position offset to attempt to maintain from the Follow target. | |
X Damping | How responsively the camera tries to maintain the offset in the x-axis. Small numbers make the camera more responsive. Larger numbers make the camera respond more slowly. Using different settings per axis can yield a wide range of camera behaviors. Not available when Binding Mode is Simple Follow With World Up. | |
Y Damping | How responsively the camera tries to maintain the offset in the y-axis. Small numbers make the camera more responsive. Larger numbers make the camera respond more slowly. | |
Z Damping | How responsively the camera tries to maintain the offset in the z-axis. Small numbers make the camera more responsive. Larger numbers make the camera respond more slowly. | |
Yaw Damping | How responsively the camera tries to track the target rotation’s y angle. Small numbers make the camera more responsive. Larger numbers make the camera respond more slowly. Available when Binding Mode is Lock to Target With World Up, Lock to Target No Roll, or Lock to Target. | |
Pitch Damping | How responsively the camera tries to track the target rotation’s x angle. Small numbers make the camera more responsive. Larger numbers make the camera respond more slowly. Available when Binding Mode is Lock to Target No Roll or Lock to Target. | |
Roll Damping | How responsively the camera tries to track the target rotation’s z angle. Small numbers make the camera more responsive. Larger numbers make the camera respond more slowly. Available when Binding Mode is Lock to Target. | |
Heading | Specifies how to calculate the heading of the Follow target. | |
Definition | Choose Position Delta to calculate heading based on the difference in the position of the target from the last update and the current frame. Choose Velocity to use the velocity of the Rigidbody of the target. If the target has no Rigidbody component, reverts to Position Delta. Choose Target Forward to use the target's local Forward axis as the heading. Choose World Forward to use a constant world-space Forward as heading. | |
Velocity Filter Strength | Controls the smoothing of the velocity when using Position Delta or Velocity in Definition. | |
Bias | Angular offset in the orbit to place the camera, relative to the heading. Measured in degrees. An axis value of 0 will put the camera here. | |
Recenter To Target Heading | Controls automatic recentering when the player gives no input. | |
Enabled | Check to enable automatic recentering. | |
Wait Time | If no user input has been detected on the axis, the camera waits this long in seconds before recentering. | |
Recentering Time | Maximum angular speed of recentering. Accelerates into and decelerates out of this. | |
X Axis | Heading Control. The settings here control the behaviour of the camera in response to the player’s input. | |
Value | The current value of the axis, in degrees. | |
Min Value | The minimum value for the axis. | |
Max Value | The maximum value for the axis. | |
Wrap | If checked, then the axis wraps around at the Min and Max values, forming a loop. | |
Max Speed | The maximum speed of this axis in degrees/second, or the multipler for the input value if Speed Mode is set to InputValueGain. | |
Speed Mode | How the axis responds to input. MaxSpeed (the default) clamps the maximum speed at which the axis can change, regardless of the input. Input Value Gain multiplies the input value by MaxSpeed. | |
Accel Time | The amount of time in seconds to accelerate to MaxSpeed with the supplied axis at its maximum value. | |
Decel Time | The amount of time in seconds o decelerate the axis to zero if the supplied axis is in a neutral position. | |
Input Axis Name | The name of this axis as specified in the Unity Input manager. Set to an empty string to disable the automatic updating of this axis. | |
Input Axis Value | The value of the input axis. A value of 0 means no input. Drive this directly from a custom input system, or set the Input Axis Name to drive the value by the Unity Input Manager. | |
Invert | Check to invert the raw value of the input axis before it is used. |