Download

Change gravity in blueprint

I see there is a default gravity Z in the project settings and it can be overriden under world settings/physics/global gravity set. But is there a way to affect this in blueprint to change gravity on the fly?

For some actors it is possible to set the “Gravity Scale” for that particular actor, for example if you want to change it on your character, get the character movement and set the Gravity Scale from there. The Gravity Scale is basically a multiplier, which multiplies with the gravity set. So if it’s set to 0.5, as an example, the gravity will be half for that actor. If it’s 2, it will be double, etc etc.

I haven’t yet found a way to set the gravity of the whole level in Blueprints though!

Yeah that’s a bummer. I’d need in on regular actors or the whole level. I wonder why it’s not possible to simply change the gravity setting on the fly. Technical limitation of the physics engine or something?

I would really like to be able to modify the gravity on the fly (I was going to have it be a superpower to alter gravity)…