How to disable character physics?

I’ve got a custom character. When I start the game, the character starts falling after a few seconds. When it hits the floor, the camera jumps to a certain position and the character stops responding to control. After a while, the character is removed from the scene.

I’m guessing the character died from the fall, but how can I prevent it from falling?

Could you explain a little more about what you are trying to achieve? If you want a flying character, using our ‘Character’ class may not be the best place to start, you may want to make a class off Pawn instead. Maybe take a look at DefaultPawn as well - that is a ‘floating’ type pawn.

I’m trying to make a helicopter. Starting off pawn sounds like a better idea. The problem is that If I add a Movement Component, the pawn becomes subject to gravity.

What kind of Movement Component are you adding? You probably want to write your own for a helicopter (if you are using C++), or you can implement it directly in the Pawn class.

Hi Cedric,

There are two simple ways to fix this. The first is to either add a BSP or a StaticMesh with collision enabled under the character spawn point. This will merely stop him from falling into your KillZ volume. The second is to go into World Settings and change the Physics > Global Gravity Z from 0 to 1. Your character will cease falling and float around. I hope that this has helped. If you have any further questions, please do not hesitate to ask.

Thanks,

Alexander

Thanks Alexander.

Changing the gravity works, but then it’s a change I have to make for all levels. How do I make this project-wide?

(Also, setting the value to 1 to remove the gravity is a bit counter-intuitive.)

Hi Cedric,

What would you find more intuitive? I am going to create a feature request for you.

Sorry for the late reply, was away all weekend.

Assuming this is a gravity multiplier, then setting it to 0 to remove the gravity would make more sense.

Hi Cedric,

I have created a feature request for the physics property display to be inverted from its current settings. I have referenced this post for more details. If there is anything else that feels counter-intuitive, please let us know so that we can provide a better editor experience.

Thank you,

Alexander

Hi Cedric,

To make this change project-wide you can add the following to DefaultGame.ini which is inside your project’s Config folder:

[/Script/Engine.WorldSettings]
DefaultGravityZ=-980.0