Disabling the cinemachine's inputs from an active state during state transitions

This is more a suggestion that would make certain things much more easier than it is current when using a State Driven Camera system with Cinemachine.

Long story short, currently Cinemachine has 1 problem which can results in a lot of chaotic camera movements while in a blended state (meaning during the time from which a Cinemachine camera is switching from 1 state to another with different behaviors).

The problem is that, during the blended state, the camera is driven not only by both states, but also their inputs, if applicable. Maybe the inputs are needed… maybe not, but I can guarantied that in most cases it’s not needed.

This is extremely easy to reproduce if you move a camera state between a state driven purely by positional data like a Target Group Camera and a input-driven state like a Free Look Camera.

When you move from the Free Look Camera to the Target Group Camera, the transition is flawless because, as the transition is moving from 1 state to the other, the end results is not impacted by the inputs.

When you move from a Target Group Camera and then smoothly move to the Free Look Camera, now that’s where the cracks clearly starts to appears because as soon as the Free Look Camera starts to take a hold onto the Cinemachine camera behavior, it will attempt to update its inputs (for example the mouse or character movement) into its positioning during the transition while none of that is supposed to happen with the other state.

During this transition, you got 1 state which is telling the camera to move to a position and look toward a direction based on some Vector3 data blended with a state that is not only telling the camera to move to a position & rotation, but also update its position based on some inputs.

If the difference between the 2 transitions are small, the problem might not be really visible as the 2 states are not fighting much, but if, for example, you were to have a state that would look in a direction, but then another state that would look in the opposite direction because the inputs tells it to, the transition will ends up being a constant chaotic rotations based on the type of Blend Style set in both state’s Transitions settings.

I would point out 2 potential solutions:

• Add an option to disable the inputs of a camera state (in the State Driven Blend asset/settings) during transition (blend time)
It could be a check box next to the “From” and “To” camera. If it’s checked then, during the transition, the Cinemachine camera state does update based on inputs. If it’s not, then during the input, the camera are purely updated by its latest state when the transition started.

After all, why would you want the camera, during a moment when it blends between 2 camera state, to move based on inputs? Unless it’s an insanely quick blend (less than 0.2s) where you want quick response between the inputs and camera even during the transition, anything slow or highly different will results in a chaotic transition.

Some might mention the Blend Hint in the “Transitions” settings of the Cinemachine Camera, but that doesn’t fix the issue.

• Add new Style of State Driven Cam Blending Style for direct transition.

This is more of a “this will fix all problem in transition” solution which I wonder why it’s not in the option.
Right now, you only have options to move from 2 cinemachine camera states with all their feature included during the transition, but there are none to transition from a position & rotation of a state to the next state.

Let’s say that you move from a Free Look Camera (which allow the player to move toward the camera) and a 3rd person camera (which doesn’t allow the player to look at the camera at all). If both camera impact the player’s character controls differently, the transition is bound to be chaotic if both state are too different.

From Free Look to 3rd person, it’s alright because you move from a unrestricted move-based camera (which can take the orientation of 3rd person) to a restricted camera.

If you move from 3rd person to Free Look and start moving the character toward the camera while in transition, as the 3rd person (which force the camera to look from behind the player) is still actively affecting the camera, the view will spin chaotically behind the player as long as it retain even a tiny bit of controls.

If there was a Blending style that could take the state camera’s position and rotation from the “From” and just used it as the transition start point which is then moved toward the “To” state (which would be actively updated as usual), it would fix many issues in such transition.

Internally, this could be done require easily by using the current “Cut” blending style, but instead of instantly moving to the next state, the system would store Vector3 and Quaternion of the From Camera state at the start of the transition (but not updating it) and use it as the source toward the new state position over a period of time.

Currently, the only way to avoid the issues for me (other than scripting a solution that would fight against Cinemachine’s behavior during transition) is to either use the Blender Setting’s style "Cut (which instantly move from 1 state to another) for transition that has risk of being chaotic or use a custom curve that has an extreme fast smooth transition (like 0.1s) to the next camera state (look smoother than Cut, but still quite sudden.)

1 Like

Hey @Max_Bol ,

Thanks for the great feedback. You raise important issues, and we have noted them and will consider options to address them for inclusion in CM 3.0.

Best regards,
Greg