Method 1: Using Global Time Dilation (Affects Entire Game)
- Open Your Character or Player Blueprint:
- Go to your character’s blueprint, typically where you handle player input and abilities.
- Add Slow Motion Input:
- Add an input action to trigger slow motion. For instance, you could use a key or button press to start slow motion.
- Adjust Global Time Dilation:
- In the Event Graph, drag from the input node and add the
Set Global Time Dilation
node. - Set Time Dilation to a value between
0
and1
(e.g.,0.2
for 20% of normal speed). - To return to normal speed, set Time Dilation back to
1
.
- In the Event Graph, drag from the input node and add the
- Optionally Add Smooth Transition:
- For a smoother transition, use
Timeline
orFInterp
to gradually change the time dilation.
- For a smoother transition, use
Example Blueprint Nodes
plaintextCopy code[Input Action (Slow Motion)]
→ [Set Global Time Dilation] (Time Dilation = 0.2)
[Input Action (End Slow Motion)]
→ [Set Global Time Dilation] (Time Dilation = 1)
Method 2: Using Custom Time Dilation (Affects Only Specific Actors)
If you want slow motion to apply only to certain actors (like the player character or enemies), you can use Custom Time Dilation:
- Select Your Character (or Actor) Blueprint:
- In your character blueprint, you can set
Custom Time Dilation
to slow down only that actor.
- In your character blueprint, you can set
- Adjust Custom Time Dilation:
- Drag the character or actor reference, then set
Custom Time Dilation
to a value like0.2
to slow down that actor.
- Drag the character or actor reference, then set
This approach is ideal if you want some actors to remain unaffected by the time slowdown, like projectiles or environmental effects.
Advanced: Adding Visual Effects
To enhance the slow-motion effect:
- Add Post-Processing: Increase motion blur or add a vignette effect.
- Sound Effects: Use a low-pass filter to muffle sounds or play slowed-down sounds when in slow motion.