Where exactly is this default gravity number (-980) coming from?

Hello! So I’ve recently begun digging into the engine source to learn more about the physics system, in particular gravity, in an effort to create directional gravity. I’ve gone through and replaced all of the gravity functions with an FVector rather than a float, and managed to build the project. However, nothing has visibly changed in the engine, and I’ve set every single value relating to the gravity function to 0. The default gravity (listed in the physics portion of Project Settings) still displays “-980” even though when I search my entire solution for “980” nothing relevant comes up.

Where exactly is this number being pulled from? I feel like I’m missing something obvious…(and I have checked the project file documents)

Thanks!

Probably in PhysX somewhere - you might search for 9.8.

That said, there is a free custom gravity plugin floating around on the Community Tools & Content forum, you could take a look at that :slight_smile:

Heh, it’s just a physics, guys :wink: Gravitational acceleration - Wikipedia

I mean, sure, but I assume it’s not being pulled from the Wikipedia page :stuck_out_tongue: He wants to know where in the code-base it’s coming from.

it is -980 cm per second, since 1 uu = 1 cm by default.
Best way to do directional gravity is to disable gravity in all objects and set a custom force for your actor (you can also create a BP force component to attach to you actors…)
this is the way I do it in my helicopter sim

Unfortunately, that solution is not going to work for the project I’m working on. :frowning:

Hmm, yeah, unfortunately that turns up nil as well. I guess my main frustration right now, is that there is a number being generated into my project, that I can’t trace the source of. It’s nagging at me like crazy, like there’s an entire chunk of the engine I’m completely unaware of :S

Yes, I know WHY the number is -980…obviously that’s the natural force of gravity on Earth :stuck_out_tongue:

P.S. I’ve used your VaRest plugin in the past, awesome work!

Isn’t setting Default Gravity Z in Project Setting -> Physics will work for you? Briefly watching the source code it looks simple even to change it to a vector value.