Where is the global gravity implementation at?

I see GetGravityZ all over the place. I also see GetDefaultGravityZ. All of these point a vector down the Z. I would like to change that. Anyone know where the master implementation is?

Depending on what you look at, it’s GetGravityZ is implemented either in:

  • UMovementComponent - which is base
    class of all movement components
  • UWorld - global world class
  • APhysicsVolume - Which is volume which will override world settings when player enters
  • AWorldSettings - Class that hold settings of level, you can override it andd add your own settings options to level

GetDefaultGravityZ is par of UWorld. You can search which function belongs to specfic class in API refrence, best for search is CHM version in Engine/Documentation/CHM

When you know which class this belongs to go to GitHub Unreal Engine source code and search for cpp/h files which is the same name as class but without prefix, for example UWorld will be World.cpp and World.h