blueprint

Sliding

  • Exposure: public
  • UE Version: 4.23

Sebastien Butor

January 21, 2021, 9:08 pm

This blueprint sample is a group of methods, events and macros used to implement a sliding system in a parkour game (in combination with a crouching system). This is part of a game I've worked on, "Lights Orb".

The sliding system with which this system is combined simply modifies the player's capsule and camera location over time depending on the crouching state (crouched / uncrouched).

This sliding system allows the character to slide for a short duration at a certain speed. This sliding system is considering the angle with the ground, modifying the sliding duration and speed. (Ex : If the player is sliding on a down slope, he will slide faster and longer, potentially for ever if the slope is hard enough). This system is tweakable, by modifying the sliding speed, duration, max and min slopes...

Reaction to slope enables the possibility to give importance to slopes, by powering the player's speed and making him jump further after a slide, as well as giving some pleasant speed sensation while sliding down a slope.

There are 5 main Methods / Graphs / Macros :

  • TheTry Crouch Method (in pink), is processed when the player tries to crouch. If the player is moving fast enough, he will slide instead of just crouching.
  • TheSlide Graph (in blue), used to update the sliding movement and animation overtime. There is also an event to interrupt the sliding movement.
  • TheUpdate Sliding Velocity Method (in orange),used to update the character's velocity with the current sliding speed.
  • TheCheck Sliding Slope (in green),used to check the angle of the current slope to modify the sliding speed and duration.
  • TheGet Down Slide Modificator Marco (in cyan),used to get the different modificators for speed and duration depending on the slope angle (the same macro exists for the Get Up Slide Modificator Macro). All those systems allows for a pretty smooth implementation, able to handle a whole bunch of situations.
Click the button above, it will automatically copy blueprint in your clipboard. Then in Unreal Engine blueprint editor, paste it with ctrl + v
Versions
January 21, 2021
  1. Conflict between two similar macros - Just displaying one

  2. Initial

    See