Skip to content

PhantomCameraNoise

Is a feature that allows PCam2D/3D to apply noise, or sometimes referred to as shake, to the camera.

The noise value is stored in the individual PCam2D/3D node, but is only applied to the Camera2D/3D when that PCam2D/3D is active.

Video Examples

How to Apply Noise

There are 3 ways to apply noise to a Camera2D/3D using this system.

Noise Property

noise-property-setup.png

Each PCam has a Noise property that takes a PhantomCameraNoise2D / PhantomCameraNoise3D resource for PCam2D / PCam3D respectively.

Supplying a resource to that will make the noise run persistently without pause on that specific PCam. So use this if you want to apply a constant noise movement on the camera when that PCam2D/3D is active.

Important

The noise will only go into effect after a tween to it has completed.


Noise Emitter Node

Noise Emitter 2DNoise Emitter 3D

Add a PhantomCameraNoiseEmitter2D / PhantomCameraNoiseEmitter3D node to a scene, assign a PhantomCameraNoise2D / PhantomCameraNoise3D resource and trigger it at any time by calling the emit() (2D) / (3D) respectively.

The effect can be previewed in the viewfinder within the editor, and during runtime, by toggling the Preview button in the noise emitter's inspector.

Important

Unlike when assigning a Noise resource directly to a PCam2D/3D, this can be triggered at any point in time and so can impact the Camera2D/3D both when following and during a tween to a PCam2D/3D if it has a matching noise_emitter_layer.


Emit Noise Function (Custom Noise Values)

If one wants to use a custom value, then the noise can be manually applied by calling the emit() function with a Transform2D / Transform3D parameter for the emit_noise() (2D) / (3D) respectively.

This is to support external libraries, addons and custom calculations that the user may want to use instead.