Pighaus Games Docs

These docs describe 1.1, the version on Fab. 1.3 is in testing: read its docs, or what changes when you upgrade.

Spatial shakes

Give a shake a place in the world and it lands harder the closer you are. A grenade across the level isn't a grenade at your feet.

Play World Shake takes a shake and the point where it happened, and works out how hard it should land from how far away the player is. You never have to calculate a strength at the call site.

The shake asset carries the distances, because the right reach belongs to the event: a grenade is felt across a room, a collapsing building across a level.

SettingWhat it does
Inner Radiusfull strength anywhere inside this
Outer Radiusnothing at all beyond this
Falloffthe shape in between: Linear, Smooth, or Inverse, which drops away fast and then lingers, like real energy over distance
Epicentre Biashow much the kick points away from the blast, 1 being fully. Lower mixes in a random direction, so a distant rumble feels like it came from "over there" without pointing at it. Directional shakes only

For a one-off that's bigger or smaller than the asset usually represents, pass your own radii to the call.

Go deeperWhy distance is measured from the character

The camera sits behind the character and swings around as the shot moves. Measuring from it would make the same explosion a different strength depending on which way you happened to be looking. Measuring from the character keeps it steady.