Skip to content
PhantomCameraNoiseEmitter2D

PhantomCameraNoise2D

Inherits: Resource

Is a resource type that defines, calculates and outputs the noise values to a Camera2D through active PCam2Ds.

It can be applied to either PhantomCameraNoiseEmitter2D or a PhantomCamera2D noise property directly

Properties

amplitude

Type: float

Default: 10

Defines the size of the noise pattern.

Higher values will increase the range the noise can reach.


Setter

void set_amplitude (float value)

Example
gdscript
pcam.noise.set_amplitude(4.2)

Getter

float get_amplitude()

Example
gdscript
pcam.noise.get_amplitude()

frequency

Type: float

Default: 0.5

Sets the density of the noise pattern.

Higher values will result in more erratic noise.


Setter

void set_frequency (float value)

Example
gdscript
pcam.noise.set_frequency(4.2)

Getter

float get_frequency()

Example
gdscript
pcam.noise.get_frequency()

randomize_noise_seed

Type: bool

Default: true

If true, randomizes the noise pattern every time the noise is run.

If disabled, noise_seed can be used to define a fixed noise pattern.


Setter

void set_randomize_noise_seed (bool value)

Example
gdscript
pcam.noise.set_randomize_noise_seed(false)

Getter

bool get_randomize_noise_seed()

Example
gdscript
pcam.noise.get_randomize_noise_seed()

noise_seed

Type: int

Default: 0

Sets a predetermined seed noise value.

Useful if wanting to achieve a persistent noise pattern every time the noise is emitted.


Setter

void set_noise_seed (int value)

Example
gdscript
pcam.noise.set_noise_seed(false)

Getter

int get_noise_seed()

Example
gdscript
pcam.noise.get_noise_seed()

positional_noise

Type: bool

Default: true

Enables noise changes to the Camera2D's offset position.


Setter

void set_positional_noise (bool value)

Example
gdscript
pcam.noise.set_positional_noise(false)

Getter

bool get_positional_noise()

Example
gdscript
pcam.noise.get_positional_noise()

rotational_noise

Type: bool

Default: true

Enables noise changes to the Camera2D's rotation.


Setter

void set_rotational_noise (bool value)

Example
gdscript
pcam.noise.set_rotational_noise(false)

Getter

bool get_rotational_noise()

Example
gdscript
pcam.noise.get_rotational_noise()

positional_multiplier_x

Type: float

Default: 1

Multiplies positional noise amount in the X-axis.

Set the value to 0 to disable noise in the axis.


Setter

void set_positional_multiplier_x (float value)

Example
gdscript
pcam.noise.set_positional_multiplier_x(0.42)

Getter

float get_positional_multiplier_x()

Example
gdscript
pcam.noise.get_positional_multiplier_x()

positional_multiplier_y

Type: float

Default: 1

Multiplies positional noise amount in the Y-axis.

Set the value to 0 to disable noise in the axis.


Setter

void set_positional_multiplier_y (float value)

Example
gdscript
pcam.noise.set_positional_multiplier_y(0.42)

Getter

float get_positional_multiplier_y()

Example
gdscript
pcam.noise.get_positional_multiplier_y()

rotational_multiplier

Type: float

Default: 1

Multiplies rotational noise amount.


Setter

void set_rotational_multiplier_x (float value)

Example
gdscript
pcam.noise.set_rotational_multiplier(0.42)

Getter

float get_rotational_multiplier()

Example
gdscript
pcam.noise.get_rotational_multiplier()