Trauma screen shake for Camera2D
In your harnessGodot componentMIT
Shake a Camera2D from a decaying trauma value: the shake is trauma to a power, and smooth seeded noise moves the offset and roll within set limits. The camera returns to its original offset and rotation when the shake ends.
ATTRIBUTION.mdLICENSEREADME.mdbaltor_test.gdcomponent.jsonexample.tscninspect_gdscript.pyrun_tests.gdtest_package.pytests/test_trauma_screen_shake_2d.gdtrauma_screen_shake_2d.gdverification/native.json
Full files in your harness.
What it takes and gives
- Class
- BaltorTraumaShake2D, extends Node
- Methods
- add_trauma(amount: float) -> void; set_trauma(value: float) -> void; get_trauma() -> float; get_shake() -> float; offset_at(time: float) -> Vector2; roll_at(time: float) -> float; get_target_camera() -> Camera2D; advance(delta: float) -> void
- Signals
- shake_started, shake_finished
- Exports
- target_path, max_offset, max_roll_degrees, decay_per_second, exponent, frequency, noise_seed
- Placement
- res://baltor/godot_components/trauma_screen_shake_2d/
Limits. 2D cameras only; it writes Camera2D.offset and rotation, so another script writing them at the same time fights it. Noise values are clamped to -1..1; FastNoiseLite simplex output rarely reaches the ends, so the full offset is seldom reached. The motion repeats for a seed on this engine build; the noise library may differ between engine versions. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.
Details
- Kind
- Godot component
- Engine
- Godot 4.3 or later
- Files
- 12 files, 78.9 KB
- Licence
- MIT
- Declared effects
- reads files, runs commands
- Checked with
- Godot 4.7.2, headless
- Checks
- godot parse check only, godot gdscript tests, godot tests reject gutted component, godot editor import, godot contract reflection, godot example scene, godot readme usage compiles
- Techniques
- trauma-based screen shake, simplex noise sampling, linear decay
- Tags
- camera, screen shake, trauma, noise, juice, camera2d, feedback
- Identity
library.supply.creative_originals.c67219527df01fc5ef9dd560.8de256890fe6fbeb- Version
8de256890fe6fbeb490eed5bb794cc2a803f83f26fc6133a63d70045d3e49b80
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.