Setting gravity vector

From what I see gravity is hard-coded to Z-axis. Is there any way to change it without making nasty hacks? Don’t care about blueprint compatibility aswell, it can be only from code.

It has to be one of the worst design decisions.

Well, the design assumes that the world isn’t exactly a sphere. You’re working with a z-plane and thus a flat world. What you could do is find the center of an object and revolve around that depending on your relative position. I think Rama at one point had some sort of working example of this… give me a moment to find it!

There it is. Check it out.

But there still won’t be gravity for cloth and particles.

anyone ever figure out how to do this for the engine as a whole?

Rotate the camera? :stuck_out_tongue:

rotating the camera won’t work for a number of reasons and would only work in a very specific case and not well

Did you ever find a solution? I’d also like to have spherical gravity…

AFAIR Epic once told they would work on a way to arbitrarily be able to change the gravity vector. I don 't know what’s the status though

Nearly 2 years late but this pull request does what you want. UE will hopefully incorporate it within a few months. You need a github account and access to their repo to see it.

Otherwise, without changing the code yourself, you could set all gravity to 0 and apply forces to your objects in the direction you want. This wont rotate characters though.

Hello 7 years later.

Any updates on this? The PR does not exist anymore and googling does not suggest anything changed at all.