Pighaus Games Docs

These docs describe 1.3, which is in testing. The version on Fab is 1.1: read its docs.

Making a shake1.3

Make a shake asset, build it from layers, watch it on the graph, try it on the camera, and play it from gameplay.

A shake is a data asset you build from layers on its panel. The panel draws what it does as you change it, and can play it on the camera without starting the game, so most of the tuning happens before anything calls it.

  • 1

    Make the asset.

    Right-click in the Content Browser, choose Miscellaneous → Data Asset, and pick Blendable Shake Asset. Name it for what it is, like Shake_Weapon_Crossbow. Quicker still: duplicate the nearest shake in the plugin's Shakes folder and change it.

  • 2

    Say how it plays.

    At the top of the panel, Plays is Once for a hit or Until stopped for an engine. Group is where it lands in the mixer: Impacts for hits, Handheld for an operator, Body for the character's own motion, World for events in the level.

  • 3

    Add a layer.

    Click the plus beside Layers, give the layer a Name, and pick what it Makes. The layer shows only the settings its kind uses, so a Kick has no Roughness.

  • 4

    Give it a size.

    Set the Amount under Tilt (deg) first, then Movement (cm) if it needs it. Start small: half a degree of pitch is a firm knock, and a couple of centimetres is a lot.

  • 5

    Watch the graph.

    The graph at the top of the panel redraws as you change anything. If the layer listens to something, a slider for it appears under the graph.

  • 6

    Try it on the camera.

    Click Play in the viewport. It shakes the level viewport without moving it, so you can fly round while it plays.

  • 7

    Play it from gameplay.

    Call Play Shake on the pawn's Blendable Shake, or put the shake somewhere that plays it for you. Below.

The graph and the buttons#

The top of the panel runs the shake through the same engine the game uses, so it can't draw something the game wouldn't do. Movement, tilt and lens each get a band of their own, scaled to their own peak, with the peak written beside it, because two degrees of lens and two millimetres of movement on one scale would hide one of them.

Under the graph is a control for everything the shake reads, and nothing it doesn't. A plain impact shows none; a handheld driven by camera speed shows one slider.

ControlWhat it's for
a slider per driverholds that value still for the whole graph. The game eases between values; the graph shows it settled
Events to firethe events the layers answer. Ticked ones fire a moment in, then every Fire every seconds, at Event strength
Pushedthe direction it's played with, for layers that follow the push: right, left, forward, back, up or down
LayersAll of them, or one layer on its own to see what it adds
Locomotion statethe state the character is in, for layers that play in one
Distance awayhow far away it happened, for layers driven by distance
Graph lengthseconds of the shake to draw
Roll againnew random choices: variation, noise and which way things go. The game rolls new ones every play
ButtonWhat it does
Play in the viewportplays the shake on the level viewport's camera, at the values, events and push above. A shake that runs until stopped keeps going until you click Stop
Play on the camerathe same button while the game runs in the editor: it plays on the player's camera
Send the eventswhile the game runs in the editor, sends each ticked event to the player's camera once
Create Unreal Camera Shakemakes an Unreal camera shake Blueprint beside the asset that plays it, for places Unreal's own shake system reaches. See shakes in the world

The rest of the panel#

Timing And Reach is how a shake starts, stops and repeats:

LineWhat's on it
FadingFades In Over and Fades Out Over when it starts and stops, and how long a shake played once runs its continuous layers
Played At A Placehow far it's felt when played with Play Shake At: Inner Radius, Outer Radius, the Falloff between, and Epicentre Bias
Playing Againits switch is Only One At A Time. Played Again says whether a second play carries on or starts over; Most At Once caps the copies; Priority holds lower ones in its group down
Same Every Timethe same motion on every play, for cinematics and replays. Seed picks which version

Under Advanced, About This Shake holds a note for whoever picks it up next, and Copy Or Paste The Whole Shake carries every setting as one line of text, between assets or projects.

Each layer has more than the size: Plays for when it runs, Starts After for a beat before it moves, Fades, Direction, Driven By and Variation. Shakes explains them, and shake settings lists every one.

Recipes from the library#

Six shakes from the library and how they're built. Open each one beside this page: the graph shows what the words say.

A landing#

Shake_Impact_HeavyLanding. One Kick, Plays set to Once, when the shake starts. Most of the movement is up and down and most of the tilt is pitch, with a little of everything else so it isn't a pure bob. An Overshoot of 15% gives one small bounce back, and Variation moves the strength up to 11% either way each time, so two landings are never identical.

Fire that climbs#

Shake_Weapon_Rifle. The shake runs Until stopped, with Only One At A Time ticked: play it when the trigger goes down, stop it when it comes up. In between, gameplay sends a camera event named Fire for every round.

  • Recoil is a Kick that plays Every time an event happens, on the named event Fire. Its Direction is Always this way, pushing back. Builds Up is on, so kicks that land before the last one settles add up, to at most 3.5 kicks, and the climb drains over 0.45 seconds once firing stops.
  • Wobble is a second Kick on the same event: a little yaw and roll, pushed at random, with a 30% overshoot so it rattles.

An explosion#

Shake_World_ExplosionNear. Played with Play Shake At, so it's felt by distance and full strength inside 4 metres.

  • Blast is a big Kick with Direction set to From the event, so it shoves away from the blast.
  • Rumble is a fast Noise, 12 cycles a second, that plays once: it holds for 0.15 seconds and fades out over 0.9.
  • Wide is a Kick on the lens only, throwing the view 2.5 degrees wider and letting it spring back.

An operator#

Shake_Handheld_Steadicam. A stabilised camera, made for a Rig's Handheld.

  • Breath is a slow Noise, about a fifth of a cycle a second, of a few hundredths of a degree.
  • Float is a Response to Camera: acceleration right, with Either Direction off, so the camera drifts a little behind every sideways start and swings past on the stop.
  • Settle does the same for Camera: acceleration forward.

None of it moves while the shot is still apart from the breath, which is what makes it read as stabilised rather than shaky.

The ground heaving#

Shake_World_Earthquake. - Heave is a Noise with Moves In set to The world's, so it heaves straight up whichever way you look.

  • Tremor is a fast Noise on tilt only.
  • Jolts is a Kick that plays Over and over, every 1.4 seconds, after a 0.3 second wait. Its Variation puts 60% on the reaction delay, so the jolts never land on a beat.

A heartbeat#

Shake_State_LowHealth. Heartbeat is a Curve layer: a double beat drawn as a curve, looping every 0.85 seconds, on a touch of pitch and a degree of lens narrowing. Sway is a slow Noise under it. Play it when health gets low and turn it up with Set Shake Scale as health falls.

Play it from gameplay#

Every node here is on the pawn's Blendable Shake component.

NodeWhat it does
Play Shakeplays it and returns a handle. Direction is which way it pushes, in the world, for layers that follow the push. Plays overrides the asset: once or until stopped
Play Shake Atplays it from a point in the world: weaker the further away the pawn is, pushing away from that point. Out of range, nothing plays and it returns 0
Stop Shakefades one out, by its handle. A shake that plays once can be fired and forgotten
Stop All Shakesfades out every shake you played, or only one group's. Body, Handheld and Rig shakes carry on
Set Shake Scalechanges a running shake's strength, easing into it rather than jumping
Set Shake Driverfeeds a named value to one running shake, for its A gameplay value, by name drivers
Set Gameplay Driverfeeds a named value to every shake, and to the Follow Camera's composition shifts, so one value can move the shot and shake it
Send Camera Eventfires a named camera event, for layers waiting on that name
Fire Camera Eventfires one of the built-in events yourself: a scripted landing, a footstep
Play Engine Shakeplays an Unreal camera shake class. The player's shake setting scales it, but it runs outside the mixer

Ignore Comfort on the play nodes plays the shake at full strength whatever the player's comfort settings say. Keep it for motion the scene can't do without: a long shake that ignores comfort can make motion-sensitive players unwell.

Go deeperPlaying shakes without depending on the camera

Gameplay code shouldn't need to know the camera exists. A movement component that names a shake asset type drags the whole camera module in behind it, and the camera stops being optional.

So there's an interface, Blendable Feedback Sink, with eight verbs: shake, rumble, jump charge, jump release, clear landing impact, burst, FOV punch and action charge. Blendable Shake implements it. Anything that wants feedback calls the interface on the actor, and if nothing implements it, the call quietly does nothing. The shake is passed as a plain object for the same reason.

Each verb also has an ordinary node on Blendable Shake, for when you already have the component:

VerbNode
ShakePlay Shake, or Play Shake At for one that happens somewhere
RumblePlay Micro Shake
Jump charge and releaseSet Jump Charge, Release Jump
Clear landing impactClear Landing Impact
BurstPlay Burst
FOV punchPlay FOV Punch
Action chargeSet Action Charge

To connect a plugin that has its own feedback interface, write a small adapter in your project: an actor component that implements their interface, finds Blendable Shake at BeginPlay, and forwards each verb to the matching node. Your project is the one place that knows about both plugins, so the join belongs there.