public struct ComposerAimTurns the camera so that what it looks at lands where it should in the frame — and leaves it alone while it already does.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Cinemachine's Composer, and the stage that does the most for how a game reads. It works in screen space rather than in angles, because framing is a screen-space idea: "keep the boss in the right third of the picture" survives a change of field of view and "keep the camera within 20° of the boss" does not.
Three regions, and the middle one is the interesting one. Inside DeadZone the camera does not move at all, so a subject fidgeting on the spot does not drag the whole frame about with them. Between the dead zone and SoftZone the camera turns towards the target at the rate the damping times allow, which is the lag that makes a camera feel operated rather than bolted on. Outside the soft zone it turns however fast it must: the soft zone is a promise that the subject will not leave it, and a promise a damping time is allowed to break is not one.
The horizon stays level. Yaw is applied about the world's up axis and pitch about the camera's own right, so no amount of framing accumulates roll. Roll is Dutch, it is deliberate, and it is applied somewhere else.
⚠ Perspective only, in the sense that matters. The stage answers a framing error by turning, and where a point lands in an orthographic frame barely depends on which way the camera is turned — so a composer on an orthographic shot will converge slowly or not at all. Framing an orthographic camera is a body's job: FramingBody answers the same error by moving, which is what works in that projection.
Fields and properties (6)
public Vector3 TrackedOffsetAn offset added to the target's position before aiming, in world space.
public Vector2 ScreenPositionWhere in the frame the target belongs, in normalised device coordinates.
public Vector2 DeadZoneThe half-extent, about ScreenPosition, in which the camera does not react.
public Vector2 SoftZoneThe half-extent, about ScreenPosition, that the target is not allowed to leave. Clamped to at least DeadZone.
public float HorizontalDampingHow long the camera takes to remove 99 % of a horizontal framing error.
public float VerticalDampingHow long the camera takes to remove 99 % of a vertical framing error.
Methods (1)
public static ComposerAim Centred(float damping = 0.5)A composer that holds its subject near the centre with a tenth-screen dead zone and half a second of lag.
Used by (8)
- CameraDirectorTestsVixen.Engine.Tests
- ComponentRegistrationVixen.Engine
- TypeRegistrationVixen.Engine
- VirtualCameraSystemVixen.Engine
- VirtualCameraTestsVixen.Engine.Tests
- VirtualCamerasVixen.Engine
- Vixen_Engine_Cameras_ComposerAimSerializerVixen.Engine
- MaterialIconsVixen.Editor.App