I want to be able to alter my level’s “World Gravity” at runtime. Is there a way to do this through scripting? I know I can SET my Default Gravity Z in the project settings…and even override that in the World Settings…but is there a way I can alter it at runtime? As an example, I’d like to have “normal” gravity and then once my player overlaps a trigger volume I alter the gravity such that all physics objects float away.
A similar question was asked so many times that Epic Games should really consider adding the possibility to change gravity via blueprints =)
Anyway, you can use a workaround: set physics objects’ Simulate Gravity to False and Add Impulse once (if you just want them to behave like in zero gravity and just float away a bit), or Add Force on Tick (if you want to simulate the gravity angle change).