# Turn Off Gravity for Kinematic Control

**URL:** <https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [December 12, 2023, 9:39pm UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896 "2023-12-12T21:39:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gviklund](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gviklund](https://forums.unrealengine.com/u/gviklund)\
**Post date:** [December 12, 2023, 9:39pm UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896/1 "2023-12-12T21:39:23Z")

</div>

I am created a Pawn controller and I know I am missing one (probably simple) step and could use some help. I’ve looked at other answers and they don’t seem to work for what I need.

I am creating a side scrolling game in 3D (Locked to X/Z Plane) where the player moves like a helicopter, left and right across the screen as well as up and down. I created a BP Pawn class and to start with just have simple inputs (L/R-U/D) mapped to WASD. The Left/Right motion works as expected but the problem comes with Up/Down.

Gravity seems to be forced on the player even with “Enable Gravity” turned off on the mesh and capsule components. I still need it to react to physics for collisions (bumping into the ground, trees or cave roof) but I don’t want it to be stuck on the ground (like it currently is). Turning gravity scale to 0 seems like a bad idea and a hack vs a solution. I know the control inputs are correct from PrintString’s output so it’s puzzling with what to change.

My question then is, is there some other place that gravity needs to be turned off to have it not affect the Player Pawn so the player can kinematically move the character?

Thanks,  
Grant

---

<div class="post-metadata">

**Author:** ![Hyaniner](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyaniner/32/1194580_2.png) [@Hyaniner](https://forums.unrealengine.com/u/Hyaniner)\
**Post date:** [December 13, 2023, 5:40am UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896/2 "2023-12-13T05:40:36Z")

</div>

[https://docs.unrealengine.com/5.3/en-US/API/Runtime/Engine/Components/UPrimitiveComponent/SetEnableGravity/](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Engine/Components/UPrimitiveComponent/SetEnableGravity/)

> [@UE5 is there a simple way to override gravity in a volume](https://forums.unrealengine.com/t/ue5-is-there-a-simple-way-to-override-gravity-in-a-volume/790265/4):
>
> Oh yeah, I keep forgetting this little thing exists: Comes with Types list, Force can be negative - may be worth playing with.

---

<div class="post-metadata">

**Author:** ![gviklund](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gviklund](https://forums.unrealengine.com/u/gviklund)\
**Post date:** [December 13, 2023, 4:29pm UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896/3 "2023-12-13T16:29:05Z")

</div>

So I’ve gone a bit further with this and decided to try a different route with a DefaultPawn class and the Movement Component. This works to a degree except the default controls are not what I want.

To get what I want I need to use InputActions (since the old way is deprecated). What is not clear is how would I add the new IA system to a pawn with the Movement Component?

Here is the BP setup I have.

 ![Helicopter Blueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/8/e18f25ca20d811bb5ac9b9dfe6e3d87f201b1658.png)

---

<div class="post-metadata">

**Author:** ![gviklund](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gviklund](https://forums.unrealengine.com/u/gviklund)\
**Post date:** [December 13, 2023, 4:31pm UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896/4 "2023-12-13T16:31:45Z")

</div>

Thanks Hyanier for the suggestion. I had tried setting that value in the BP with no luck (which surprised me). I’ll try it with different Force settings to see if I can get a better result.

---

<div class="post-metadata">

**Author:** ![gviklund](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gviklund](https://forums.unrealengine.com/u/gviklund)\
**Post date:** [December 13, 2023, 5:04pm UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896/5 "2023-12-13T17:04:18Z")

</div>

It looks like I have this solved for now at least. The Default Pawn with the Movement Component works for gameplay like this.

The one step I missed (and you can see it in the BP screenshot) is to set the Mapping Context in the node. Once I did that and turned off the default input, everything worked as expected.

@Hyaniner thanks for your help in some ideas to try.

---

<div class="post-metadata">

**Author:** ![Hyaniner](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hyaniner/32/1194580_2.png) [@Hyaniner](https://forums.unrealengine.com/u/Hyaniner)\
**Post date:** [December 14, 2023, 5:18am UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896/6 "2023-12-14T05:18:26Z")

</div>

@gviklund I’m really happy to see your success! This engine is huge, so sometimes it’s hard to find some clue. I’ve experienced similar things so many times like you.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 13, 2024, 5:18am UTC](https://forums.unrealengine.com/t/turn-off-gravity-for-kinematic-control/1520896/7 "2024-01-13T05:18:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
