Math node new in 3.1
Spring
A spring you kick: every Trigger adds an Impulse and the value swings and settles back to Target. Kicks add up instead of restarting, so hits can come at any moment — a shot mid-swing pushes the swing further. Damping below 1 rings, 1 returns without overshoot, above 1 snaps out and creeps back (recoil). Limit caps a pile-up of kicks; Variation makes every kick a little different. Amplitude is the ring's envelope — drive a flash, smoke or a sound with it.
Inputs
| Port | Type | Default |
|---|---|---|
| TriggerEvery rising edge kicks the spring once: a Keyboard's Just Pressed, a beat, a Kick from another Spring. Holding it true kicks only once. Kicks add to the motion already there — nothing restarts. | bool | false |
| ImpulseHow hard one kick is, in output units: the peak an undamped spring would swing to. Damping lowers the real peak (a lot above 1). Negative kicks the other way. Not clamped. | float | 1 |
| TargetWhere the spring rests; Value swings around it. Cable a moving value and the spring follows it with its own inertia and overshoot. | float | 0 |
| FrequencyHow fast it swings, in Hz (0.01–200). A cannon's recoil 2–4, a hanging gondola 0.3–0.6, a camera shake 8–15. | float | 1.5 |
| DampingDamping ratio (0–50). Below 1 rings and overshoots (0.1 rings long, 0.5 settles in a swing or two); 1 returns without overshoot; above 1 snaps out and creeps back slowly — 3 to 6 for a recoil and run-out. | float | 0.2 |
| LimitThe most a pile-up of kicks may swing, in output units (0 = no cap). A kick while the spring is already at the cap adds nothing — key mashing cannot fling it away. | float | 0 |
| VariationEach kick is scaled by a random 1 ± Variation (0–1): 0.15 makes shots a little different. Repeatable: the same Seed gives the same sequence of kicks. | float | 0 |
| SeedPicks the sequence of random kick sizes when Variation is above 0. | int | 0 |
| ResetA rising edge stops the spring dead at Target. A Reset held true from the start is ignored. | bool | false |
Outputs
| Port | Type |
|---|---|
| Value | float |
| Velocity | float |
| Amplitude | float |
| Kick | bool |
Open Spring in the interactive catalog →
Spring is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.