Actor is falling, even though I unchecked Simulate Physics and Enable Graviaty

Hey all!

I’m working on my first unreal engine 5 game, nothing crazy, just a spaceship shooting stuff in space. I want the spaceship to stay in the air and only move backwards, forwards or horizontally.

But I ran into an issue. The moment I start the game the spaceship starts falling, even though I have Simulate Physics and Enable gravity unchecked. I’d imagine those should make it so it’s not falling.

Where did I go wrong and how can I stop it from falling?

I was able to figure out a temporary solution, by just resetting its Z position every frame to 0, but I feel like there should be a better solution. Any help is much appreciated!

Do you have a character movement component? You could try setting the Gravity Scale to 0. You could also try setting your default land movement to Flying. I could be wrong, but I think Character (or character movement) class always applies gravity. If you’re not using Character, a different movement component will likely work better… or don’t use one at all.

There seems to be a “Planar Movement” section with “Constrain to Plane” checkbox and other settings. I’ve never used it, but might be something useful. Note that this shouldn’t be needed to stop your actor from falling. That should be fixed first.

I’ll try this in a separate project and will let you know. But you can try Gravity Scale to 0 in the meantime.

1 Like

Yeah, I just tried it on a Character. Turning Gravity off and physics off still has the character falling. But with Gravity Scale of zero keeps the actor in the air.

Let me know if this works for you.

Hey there @HelloImAron112! Are you using the Character class? If so, as @AlienRenders mentioned, the Character class actually handles it’s own gravity separate from physics system. This allows you more control over how the character actually simulates, and without it replication would be more painful.

Usually when making a space ship, users tend to use a Pawn class (parent class of Character with less of the upright character necessities). Not that you can’t use a Character class.

Here’s a thread that shows off a quick example a user created to demonstrate this:

1 Like

Setting gravity to 0 worked perfectly, thank you so much!