normal landing and roll landing

Hi. i want to make it so when i have fallen for less than 5 meters i will land normaly and when i have fallen for over 5 meters i will roll

You can use a branch to achieve this. You can check the distance by using a trace, a timer of how long you have been in the air, etc.

With the time setup and tweaked, you can input the result into a branch. Simply trigger the branch state using the variable and thus changing the state of the animation.

Similar to the previous suggestion, if you’re using an anim state machine, you could also branch the falling state to a new “falling fast” state or some such when the fall speed exceeds a certain threshold. This would transition to a state for the roll landing, while the initial falling state goes to regular landing.

While this wouldn’t know the precise distance the character has fallen, it would generally work better with uneven surfaces. For example, if falling down along a steep slope, one’s height above the ramp may never go past 5m but still end up fast enough to want a roll.

As a bonus, you could also have a different anim in the fast fall state which could tense up to prepare for roll, flail about in panic, or whatever.

This is ancient, but it gives you an idea.

Prototyping in ABP is ok. for release, all that code has to be removed and ran on the character, while only changing boolean to toggle the animation states.

Also using time remaining is a no-no. simply make sure the animation doesn’t loop and toggle the auto transition checkmark.