Best or standard way for camera shake with multiple room/level confiners, using impulses?

Based on my limited understanding of Cinemachine, is this the standard way to have camera shake (bullet shoot or take damage) on rooms/levels with multiple confiners?

  • Each room/level will have its own virtual camera that has its own confiner extension, that listens to an impulse. To avoid duplication (e.g. of Dead Zone settings), I’ll have to use a prefab.
  • Every time the player takes damage or shoots, it fires a camera shake impulse.

Because I wanted to try see if it was possible having one single virtual camera and replacing the “bounds” in the confiner extension, but replacing the bounds or unsetting the bounds (i.e. setting it to null) causes the camera to “jump/teleport” instantaneously. Because I can’t have a single camera, the only way I can make the camera shake consistently is to configure every virtual camera to listen to impulses?

Yes, you can add the impulse listener to each vcam.
There is no advantage to doing everything with a single vcam.
Why not make a prefab for the vcam, and just override the confiner bounds field in each instance?

Alternatively, instead of an ImpulseListener extension on the vcams, you can add a CinemachineIndependentImpulseListener to the main camera.

2 Likes

Thank you, makes sense.

Cinemachine has been very helpful and fast to learn. I have now used impulses a lot and they are very helpful (though I also used the legacy ones).