# Character Executes Airborne Attack when on the ground?

**URL:** <https://forums.unrealengine.com/t/character-executes-airborne-attack-when-on-the-ground/482427>\
**Category:** Character & Animation\
**Tags:** falling, roll, attack, unreal-engine, question\
**Created:** [April 25, 2021, 10:39am UTC](https://forums.unrealengine.com/t/character-executes-airborne-attack-when-on-the-ground/482427 "2021-04-25T10:39:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trichiliocosmos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trichiliocosmos](https://forums.unrealengine.com/u/Trichiliocosmos)\
**Post date:** [April 25, 2021, 10:39am UTC](https://forums.unrealengine.com/t/character-executes-airborne-attack-when-on-the-ground/482427/1 "2021-04-25T10:39:23Z")

</div>

There seems to be a bug in my game in which my character will be in a ‘falling state’ even though he is on the ground, which then causes the next attack to be an aerial attack instead of a grounded attack. I usually get this bug when I spam my roll. I made sure to override Z to prevent any upwards movement. Any solutions? By spamming rolling I don’t get this issue. It usually comes only if I spam roll AND spam attack.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [April 25, 2021, 4:04pm UTC](https://forums.unrealengine.com/t/character-executes-airborne-attack-when-on-the-ground/482427/2 "2021-04-25T16:04:43Z")

</div>

Hello! By ‘falling state’ do you mean Movement Component state? Also is it the one from engine or some overriden thing?

---

<div class="post-metadata">

**Author:** ![Trichiliocosmos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trichiliocosmos](https://forums.unrealengine.com/u/Trichiliocosmos)\
**Post date:** [April 26, 2021, 12:06am UTC](https://forums.unrealengine.com/t/character-executes-airborne-attack-when-on-the-ground/482427/3 "2021-04-26T00:06:56Z")

</div>

By falling state I mean that ‘Is Falling’ (linked to character component) is being applied, which allows the roll to transition into an aerial attack, even though the roll animation occurs on the ground. I used print string to see if ‘Is Falling’ is being activated when I do the aerial attack on the ground and it is.

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [April 26, 2021, 4:05pm UTC](https://forums.unrealengine.com/t/character-executes-airborne-attack-when-on-the-ground/482427/4 "2021-04-26T16:05:25Z")

</div>

Do you have root motion in your anim clips? Also maybe some logic on Z coor or Z Velocity play a part in this?

---

<div class="post-metadata">

**Author:** ![Trichiliocosmos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trichiliocosmos](https://forums.unrealengine.com/u/Trichiliocosmos)\
**Post date:** [April 27, 2021, 5:03am UTC](https://forums.unrealengine.com/t/character-executes-airborne-attack-when-on-the-ground/482427/5 "2021-04-27T05:03:35Z")

</div>

Yes, I have set the root motion for all my animations. I also made sure that my launch character forward doesn’t have a Z velocity. The more I test it out, the more I realize that it has something to do with pressing the keys very fast. I can only do the aerial attack if the combination is done very fast. It doesn’t even have to be a dash. Just a directional key and an attack. A roll by itself won’t trigger it, not will an attack.

EDIT: Was able to fix it by substituting ‘IsFalling’ node to check whether I was in air for an attack for a boolean (In Air?) that checks whether I am in air, with the boolean resetting on landed. Thanks for the help though.
