# How can i disable jump while swimming

**URL:** <https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618>\
**Category:** Rendering\
**Tags:** Water, jumping, unreal-engine, question\
**Created:** [December 31, 2020, 7:43pm UTC](https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618 "2020-12-31T19:43:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Napimel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napimel](https://forums.unrealengine.com/u/Napimel)\
**Post date:** [December 31, 2020, 7:43pm UTC](https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618/1 "2020-12-31T19:43:48Z")

</div>

How can i disable the jump while i swim or leaving the PhysicsVolume set as WaterVolume, everytime i leave the water or i aproch surface it start jumping.

---

<div class="post-metadata">

**Author:** ![ugmoe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ugmoe](https://forums.unrealengine.com/u/ugmoe)\
**Post date:** [December 31, 2020, 7:51pm UTC](https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618/2 "2020-12-31T19:51:28Z")

</div>

this should work

 ![326022-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/c/e/1ce6c833f7bb8c4cc7dc6da68cf1abf4fbf6cc8b.png)

---

<div class="post-metadata">

**Author:** ![Napimel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napimel](https://forums.unrealengine.com/u/Napimel)\
**Post date:** [December 31, 2020, 8:12pm UTC](https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618/3 "2020-12-31T20:12:33Z")

</div>

This will help, but it jump without me using jump input, it have something to do with IsInAir? bool from animation blueprint but i cant find a way to fix it.

---

<div class="post-metadata">

**Author:** ![ugmoe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ugmoe](https://forums.unrealengine.com/u/ugmoe)\
**Post date:** [December 31, 2020, 8:31pm UTC](https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618/4 "2020-12-31T20:31:10Z")

</div>

I’m not sure why it would jump without you pressing jump. It could have something to do with these settings, try raising/lowering these values and see what happens.

If that doesnt work, you will have to look at the CharacterMovement.cpp file and try to figure out why it’s jumping like that. I know sometimes the animation blueprint could also be the cause of jumping off ledges, so maybe it causes you to jump out of water too.

 ![326020-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/d/7ddfa7288345c1dd76b9e9b8cbca8cf09bd1a08a.png)

---

<div class="post-metadata">

**Author:** ![Napimel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napimel](https://forums.unrealengine.com/u/Napimel)\
**Post date:** [December 31, 2020, 11:30pm UTC](https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618/5 "2020-12-31T23:30:30Z")

</div>

Not working is related to animation, once i disable the IsInAir? boolean is doesnt jump on beeing at surface of water or exit from water

---

<div class="post-metadata">

**Author:** ![AshManScoop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AshManScoop](https://forums.unrealengine.com/u/AshManScoop)\
**Post date:** [September 14, 2023, 12:28pm UTC](https://forums.unrealengine.com/t/how-can-i-disable-jump-while-swimming/476618/6 "2023-09-14T12:28:41Z")

</div>

Thanks, you helped me figure out what was causing this for me.

I know its a couple years late but heres how i just fixed it

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/c/94ca9410ae1ed548e9800095b5934a3f4dc4bf77.png)

I have a first state of swimming which changes the buoyancy from 1 to 1.5 when i enter to keep the player at the top of the water. So i used that value as a check as to whether the jump animation should trigger. you could use something like IsSwimming as a bool as your check in a similar way
