Spielerando

Spring motion

Makes a value chase its target as if it hung on a spring, fast at first, then slowing, with an optional wobble. You can change the target at any moment and it reacts naturally, and a slow frame never breaks it.

When you need it

When something should feel alive and respond to the player: buttons that grow on hover, a pet following along, a bar that jiggles when it fills, a sword that lags behind the hand.

Say this to your AI

Use the spring motion from Spielerando so my buttons pop up with a small bounce when the mouse goes over them.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

Settings

Your AI gets the code

The finished code and math come through the Spielerando connection, so your AI can use them right away. Connect your AI

Common questions

how do i make a bouncy animation that reacts to the player

A fixed animation has to finish before it can change. A spring just chases its target, so the player can change the target at any time and the movement stays smooth.

what is the difference between a spring and an easing curve

An easing curve has a set start, end and length. A spring has no set length: it reacts to where the target is right now. Use easing for planned moves, a spring for things that follow the player.

why does my spring explode on a slow computer

Adding up small steps goes wrong when a frame takes long. This recipe works out the exact position for any length of time, so a long frame simply lands where it should.