Zero air friction

I’m trying to make a game where the player is floating in space, so I want there to be no friction. I’ve created a Character Movement blueprint, set it to Flying mode, zeroed out the braking force, but my character still loses velocity when input stops (in approximately 10 seconds it’s at a dead stop).

Is there an air friction, or damping value I can change to fix this? Or do I have to hack a solution together? I have zeroed out all colliders’ linear damping just in case, even though none of them are simulated.

Notes: I have no other physics objects in the scene that the character movement could be bumping into or scraping against to remove the velocity.

Thanks.

Well this was a fun one! I had to dive into the engine source code to find the answer. :smiley:

When using the Falling movement mode, the character movement component applies friction to the character’s velocity depending on the Fluid Friction setting in whichever Physics Volume the character is currently within. When the character is not within any Physics Volume, or if no Physics Volumes exist in the level at all, the character movement component falls back on the level’s default physics volume.

The quickest way to remove all flying friction is to drag a Physics Volume into your level, and make it as large as you need to envelop everywhere your characters need to go.

Then in the details panel for that Physics Volume, change the Fluid Friction setting to zero:

If manually placing and sizing up Physics Volumes into each of your levels sounds too tedious, and you don’t mind digging into a bit of C++ programming, you can create your own custom physics volume class by extending APhysicsVolume and change its default fluid friction to zero. Then you’d just have to change each level’s default physics volume class in the World Settings panel:

(If there’s a way to globally change all your levels’ default physics volume class, I couldn’t find it, but I’d love to know if anyone else knows how!)

I agree with @SavvyIndoorsman… just to comment that if you’d prefer to adjust the default physics volume settings… there are a couple of places where you might be able to intervene:

– In Project settings > Engine > Physics > Default Fluid Friction

– In BP with Get Physics Volume and dragging out Set Fluid Friction (need character Reference)… If you are only using the default physics volume… I’d just do once on BeginPlay.

Btw… as far as I remember, the first option might not work, but it’s worth trying…