# How do i make my character stay mid air while i attack

**URL:** <https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320>\
**Category:** World Creation\
**Tags:** gravity, attack, unreal-engine, Physics, question\
**Created:** [January 9, 2017, 9:48am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320 "2017-01-09T09:48:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakupiii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jakupiii](https://forums.unrealengine.com/u/Jakupiii)\
**Post date:** [January 9, 2017, 9:48am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320/1 "2017-01-09T09:48:07Z")

</div>

So im having trouble with air combat i have my first 2 attacks launching me in the air then i want the rest of the attacks to attack while mid air. I tried using set enable gravity and calling it in the notify,animation BP but i he not staying he keeps falling 😕 cant figure it out can someone please help!

---

<div class="post-metadata">

**Author:** ![learningOver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@learningOver](https://forums.unrealengine.com/u/learningOver)\
**Post date:** [January 10, 2017, 12:32am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320/2 "2017-01-10T00:32:28Z")

</div>

You may want to try using the flying movement mode while the attack are performed.

---

<div class="post-metadata">

**Author:** ![Jakupiii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jakupiii](https://forums.unrealengine.com/u/Jakupiii)\
**Post date:** [January 10, 2017, 6:18am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320/3 "2017-01-10T06:18:08Z")

</div>

Can you clarify please, how do i use this mode

---

<div class="post-metadata">

**Author:** ![Speckulous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Speckulous](https://forums.unrealengine.com/u/Speckulous)\
**Post date:** [January 10, 2017, 7:52am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320/4 "2017-01-10T07:52:58Z")

</div>

Set enable gravity is buggy.

There is a “Set Gravity Scale” function (or similar name) in the CharacterMovementComponent, you can set that to 0 at the begin of your attack and back to 1 at the end.

Thats just a workaround and I don’t know how to apply this to other actors/BPs

---

<div class="post-metadata">

**Author:** ![learningOver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@learningOver](https://forums.unrealengine.com/u/learningOver)\
**Post date:** [January 10, 2017, 10:37am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320/5 "2017-01-10T10:37:29Z")

</div>

Using your character movement component in your character blueprint, you can find the setmovementmode node, here a few movement styles are provided.

---

<div class="post-metadata">

**Author:** ![Jakupiii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jakupiii](https://forums.unrealengine.com/u/Jakupiii)\
**Post date:** [January 10, 2017, 10:52am UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320/6 "2017-01-10T10:52:49Z")

</div>

i need more work on it but it did help so thanks!

---

<div class="post-metadata">

**Author:** ![AngeIV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngeIV](https://forums.unrealengine.com/u/AngeIV)\
**Post date:** [September 6, 2020, 7:05pm UTC](https://forums.unrealengine.com/t/how-do-i-make-my-character-stay-mid-air-while-i-attack/381320/7 "2020-09-06T19:05:40Z")

</div>

WORKS PERFECT! I didnt think of that! thanks 😃
