A Step-by-Step Guide to Creating Squash & Stretch Components in Unreal Engine 5
Learn the exact component-based workflow used in professional game development to create satisfying, responsive interactions that players love. This technique transforms static objects into living, breathing game elements.
Before diving into the implementation, let's understand why this principle is fundamental to game feel:
Players immediately understand object interactions through visual deformation
Transforms basic mechanics into satisfying experiences without additional assets
Reusable system that works across all your game objects
Minimal cost with maximum visual impact using just scale transforms
We'll start by creating a reusable Actor Component that can be attached to any actor in your game. Navigate to your Content Browser and create a new Actor Component Blueprint named BPC_SquashStretch.
Add these essential variables to your component. These will track our animation state and store the original scale:
Add a new function named AnimateScale. This will be our main animation driver, called every tick to update the scale.
Call AnimateScale from Event Tick. The boolean check we'll add prevents expensive operations when not animating, keeping performance optimal.
From AnimateScale, add a Branch node with bIsAnimating as the condition. This ensures we only process animation logic when needed.
Increment our timer by the frame's delta time to track animation progress:
Create a SquashScale variable (Vector3) with values like (1.3, 1.3, 0.7). This defines how much the object squashes - wider in X/Y, compressed in Z.
Determine if we're in the squash phase (first half) or stretch phase (second half):
Create a normalized alpha value (0 to 1) representing our progress through the squash phase:
Use linear interpolation to smoothly transition from original to squashed scale:
Apply the calculated scale to the owning actor:
Determine if the animation has completed its full cycle:
Create a clean reset to end the animation:
For the stretch phase, calculate alpha for the return journey:
Lerp from the squashed scale back to the original scale:
Apply the interpolated scale during the return phase:
Add a public function to trigger the animation:
Compile your blueprint and save. Your component is now ready to use across your entire project!
Add the component to any actor and call TriggerSquashStretch to activate:
Gun firing squash (1.3, 1.3, 0.7), reload animations, melee swings
Hit reactions (0.7, 0.7, 1.3), death squash, spawn animations
Jump landing, dash moves, damage feedback
Button presses, menu transitions, notification bounces
Collection squash, hover idle animation, spawn effects
Platform impacts, door slams, explosion debris
This tutorial is just the beginning. Master advanced Unreal Engine 5 techniques with our upcoming courses and free resources.