Skip to content

Punch and Shake

rmfandyplayz edited this page Sep 30, 2026 · 2 revisions

These give something a jolt and let it settle back where it started, like a button squishing when pressed or an icon shaking on a wrong answer.

  • Punch (Punch Anchored Position, Punch Rotation, Punch Scale) springs in one direction and wobbles back, like a spring.
  • Shake (Shake Anchored Position, Shake Rotation, Shake Scale) jitters in random directions, then settles.

They always end exactly where they started, so they have no From, To or Ease. Instead they show:

Field Punch Shake
Punch / Strength How far it jolts, per axis How far it shakes: one number for Shake Anchored Position, per axis for the other two
Vibrato How many times it wobbles during its Duration Same
Elasticity / Randomness How far it can overshoot past its start, from 0 to 1 How random the direction is, in degrees

Good starting values

Effect Type Values
Button squish Punch Scale Punch -0.1, -0.1, 0, Duration 0.25
"Wrong!" headshake Shake Anchored Position Strength 10, Duration 0.4
Wobble Shake Rotation Strength 0, 0, 15, Duration 0.4
Jelly Shake Scale Strength 0.25, 0.25, 0, Duration 0.5

Tip

On UI, rotate around Z only. Leave X and Y at 0 for Punch Rotation and Shake Rotation, because turning around those tips a flat element over in 3D. Likewise, leave Z at 0 for Shake Scale.

Spamming is safe

If a punch or shake is cut short (played again, stopped, interrupted, or its object disabled), it's put straight back where it started. So hammering a button with a squish on it always leaves the button at its normal size.

Under the hood
  • DOTween's punch and shake work relative to the value at the moment they start. Before this was handled, a punch stopped mid-wobble stayed displaced, and the next one wobbled around that: three quick presses of a scale-punch button left it at 2.19× its size. The player now writes the start value back whenever it stops one part way through. One that hasn't started, or has finished, is already there.
  • Where two overlapping punches on the same property are both cut short, the earlier one's start wins, since that's where the first one began.
  • They're never affected by Play At Custom FPS, since they drive their own oscillation.
  • Shake is random, so it looks slightly different each time.
  • Shake Rotation and Shake Scale take a strength per axis precisely so that Z-only rotation is possible. DOTween's single-number rotation shake turns all three axes. Shake Anchored Position predates this and still takes one number.

Clone this wiki locally