Overview
When perspectives are switched, the continuous parts of the camera state transition from the state at the moment of the switch to the target state within a fixed duration. Position, rotation, FOV, and orthographic view height may use mutually independent algorithms. Projection mode is a discrete state and directly uses the target value.
Time and progress
Let the transition duration be
Then apply the easing function
The easing function describes how time is allocated across the transition window. It can be a linear function, a smooth curve, or any other function that satisfies the progress constraints; the specific curve only changes how the progress varies over time, not the state formulas of each algorithm. The same
When
Shared goal of the algorithms
Let
The target state may also keep changing, for example player movement changes position and mouse input changes orientation.
Continuous and discrete states
Position, rotation, FOV, and orthographic view height are continuous states that can transition smoothly. Projection mode is a discrete choice and cannot be numerically interpolated between perspective and orthographic projection; it becomes the target mode immediately at the switch. Orthographic view height remains a continuous scalar and can therefore vary smoothly on its own.