Download

Creating a slide animation

How would I go about creating a slide similar to Destiny or COD in my character’s movement. I am no familiar with BP quite yet but I can throw in some cpp code.

This can be done using blendspace blueprint state machine, for example, when user press ctrl, a bool is set to true, then from a state machine like this:

when bool is true, it will blend from run anim to slide anim, when bool off, it will blend back to walk/idle of however you implement it.

Is it a slide as in
run and slide

or a slide as in…
“the terrain is too steep you silly player. Get the hell back into the play area”?

?

For the first one.
Simply toggle a boolean on. And use an end animation transition notify to toggle it back on so that it’s easy to prevent multi sliding.

For the second one.
The capsule has a current floor result. Access it. Get the impact normal.
Do 90- radian to degree (dot (impact normal, actor forward vector))

And you have +/- results of the angle at which the player is facing to do things with.

Choose an animation, in a blendspace or set up a “slope” system.

General rule of thumb.
Read the Animation Fast Path documentation.

Never do anything that requires performing math in the animation blueprint.
Inclouding but not limited to And statements…

If you need to check multiple states or similar, you have to break the state into another nested statemachine in which you only check the second condition to keep fast path optimizations.

It can be complicated af.