Shaking multiple cameras with Camera Shake

Some projects require multiple cameras to render different content. For example, a game may support split-screen with a camera for each player. Camera Shake fully supports shaking multiple cameras.

There are three ways to shake multiple cameras, depending on project requirements: Shaking cameras with the same motion, shaking cameras with different motions, or a combination of the two.

Shaking cameras with the same motion

Some scenes are set up with multiple cameras (for example, a near and far camera). Camera shake can handle scene setups like these by shaking all cameras at once. Each Camera Shake component has an array of cameras that can be set. Every camera in this array will shake at once. 

Shaking cameras with different motions

In order to shake cameras with different motions (such as in a split-screen game), multiple Camera Shake components can be used.

Instead of calling the static method CameraShake.ShakeAll(...) you can call the instance method Shake(...) on each Camera Shake component:

myCameraShakeComponentA.Shake(...); myCameraShakeComponentB.Shake(...);

Combining both methods

Both of the above methods can be combined, for more complex scenes. An example of this would be a split-screen game where each player has a near and far camera, or complex VR setups.

Still need help? Contact Us Contact Us