Can't disable gravity for skeletal mesh

This has stumbled me a bit. I started off with the Flying UFO template. It has disabled gravity and use C++ code to move the ship around. Works great, except it doesn’t really handle physics and collisions.

I replaced the static mesh UFO with a skeletal mesh for bone animations of a bird flying, but it keeps falling to the ground. I’ve tried disabling gravity on the skeletal mesh, but it still falls as if gravity applies to it. If I disable physics altogether, it does not fall, but I want collision physics and Hit events. The mesh has a physics asset with a single body of about 2 kg. If I go back to the UFO static mesh with the same settings (physics on, gravity off), it does not fall to the ground. Is this something fundamentally different for skeletal meshes? Can’t I disable gravity while still simulating physics?

Reproduced on 4.3.1 and 4.4.2.

Hi Anjdreas,

That is a known bug with setting gravity. The current work around is to instead get a reference to the movement component, then drag off of that to do a “Set Gravity Scale” and make that 0. Let me know if that works for you.

Thanks,

Alexander

Thank you, I thought I was losing my mind for a while there :slight_smile: Could not find any relevant info googling or searching this forums on this, hopefully this post will help others.

I encounter exactly the same problem in version 4.6.1. Has this bug been fixed now?

Hey Bgkdw,

This issue is still being worked on by our developers, the report number is: UE-11622. This will be corrected in a future update of the Engine. If you have any further questions, please let us know!

Thanks!

Has this been fixed yet?

Hey,

This issue has not been fixed yet. It currently has an ETA to be corrected in 4.10 however this could change depending on the priority of the matter as new updates are submitted by our developers. Please feel free to check back in a few weeks.

Thanks!

Hey Everyone,

I have just received the Jira report back. This is actually a ‘by design’ issue. Gravity is controlled per body in a skeletal mesh, you need to set the flag on bodies in the PhAT editor if you’d like to make changes.

Thank you!

Hi

Can you explain this further? This is for how to enable/disable gravity on a skeletal mesh in gameplay correct?

I still get no results using either enable gravity false or setting the gravity scale to zero in character movement.

Do I need to setup something in PhAT?

Thank you.

Gravity would be controlled per body in a skeletal mesh therefore, you will need to set the flags on the bodies in the PhAT editor to create gravitational changes.

no gravity:
go and disable gravity for all bodies

yes gravity:
go and enable gravity for all bodies who's BodySetup.DefaultInstance.bEnableGravity == true

Documentation: Physics Asset Tool (PhAT)

If you have any additional concerns, I would suggest creating your own AnswerHub post, or forum post as this one is from 2015.

Thanks!

2019 and bug still in the engine. Stop working on fortnite, its a trash game