PhantomCameraNoiseEmitter3D
Inherits: Node3D
Is a node meant to apply positional and rotational noise, also referred to as shake, to the Camera3D
. It is designed for use cases such as when hitting or when being hit, earthquakes or to add a bit of slight movement to the camera to make it feel less static.
The emitter can affect multiple PCams
in a given scene based on which noise_emitter_layer are enabled.
To trigger the emitter, simply call its emit function.
Properties
noise
Type: PhantomCameraNoise3D
Default: null
The PhantomCameraNoise3D resource that defines the noise pattern for this emitter.
Setter
void
set_noise (PhantomCameraNoise2D
value)
Example
pcam_emitter.set_noise(noise_resource)
preview
Type: bool
Default: false
If true, previews the noise in the editor - can be seen in the viewfinder.
Note: This property is only accessible within the node's inspector panel in the editor.
continous
Type: bool
Default: false
If true, repeats the noise indefinitely once started. Otherwise, it will only be triggered once.
growth_time
Type: float
Default: 0
Determines how long the noise should take to reach full intensity once started.
The value is set in seconds.
duration
Type: float
Default: 1
Sets the duration for the camera noise if continuous is set to false.
The value is set in seconds.
decay_time
Type: float
Default: 0
Determines how long the noise should take to come to a full stop.
The value is set in seconds.
noise_emitter_layer
Type: int
Default: 1
Enabled layers will affect PhantomCamera3D nodes with at least one corresponding layer enabled. Enabling multiple corresponding layers on the same PhantomCamera3D
causes no additional effect.
Methods
emit
Type: n/a
Default: n/a
Emits the noise from the emitter based on the applied PhantomCameraNoise3D resource and various properties assigned.
It will affect all active PCam3Ds
with at least one matching noise_emitter_layer.
is_emitting
Type: n/a
Default: n/a
Returns the state for the emitter. If true, the emitter is currently emitting.