Skip to content

ShakerReceiver3D

Enes Kaplan edited this page Jul 9, 2024 · 1 revision

ShakerReceiver3D

ShakerReceiver3D is a class that extends Node3D and is used to receive and process shake effects from ShakerEmitter3D nodes in 3D environments.

Properties

enter_fade_in

Controls the easing of the shake effect when it starts.

Type Default
float 0.1

exit_fade_out

Controls the easing of the shake effect when it ends.

Type Default
float 3.0

Methods

get_value

Returns the current shake values.

Syntax:

Parameter Type Description
None

Example:

var shake_values = shaker_receiver.get_value()

Return value: Array[Vector3] containing position_offset, rotation_offset, and scale_offset

Return value: None

Inner Class: EmitterData

This inner class is used to store data for each emitter affecting the receiver.

Properties

  • emitter: ShakerEmitter3D
  • timer: float
  • fade_out_timer: float
  • ease_out_intensity: float

Notes

  • The class requires an Area3D child node to function properly.
  • It automatically creates an Area3D child if one doesn't exist.
  • The class should be a child of a ShakerComponent3D node.
  • It processes shake effects from multiple ShakerEmitter3D nodes simultaneously.
  • The shake effect is applied to the receiver's position, rotation, and scale in 3D space.
  • The class uses the Godot Engine's editor hints to ensure proper setup in the editor.