Description
Changelog
Reviews (0)

DampedSprings

Damped Springs are the ideal way to add motion smoothing for objects that have inertia. These work like shock absorbers with a spring and dampener.

Things like cameras, weapon bob, object following/orbiting behaviors, platform/door movement will appear more realistic when filtered with a damped spring. They also work consistently across update rates and with continually changing target positions.

Springs may also be "critically damped" which means the damping is perfectly tuned to smooth an object as fast as possible without overshoot, and is a very satisfying motion.

This extension that adds DampedSpring, DampedSpring2D, DampedSpring3D as spring instance objects that you manually update, and a DampedSpringParameters Resource that has intuitive setup values.

Usage

@export var spring_params: DampedSpringParameters
var spring := DampedSpring2D.new() # this is a spring instance, where parameters can be shared across multiple instances

func _process(delta: float) -> void:
    sprite.position = spring.update(delta, sprite.position, target_position, spring_params)

API Documentation

Wiki

Changelog for version v0.9.4

2026-10-02 14:40:23

No changelog provided for this version.

Reviews

DampedSprings has no reviews yet.

Login to write a review.

Consider supporting the creators!

If you enjoyed this asset consider supporting its creator. Follow the link below.