I want to change how gravity affects my character, specifically so that it can walk on a sphere, while still keeping most of the funcionality of the Character class. I know that I need to modify the engine to do this, and I haven’t done any c++ coding in unreal before, so I’m still trying to get the hang of things. My idea was to find the implementation of gravity, figure out how it works, and then change it.
What I tried doing was to follow the Movement Component’s getGravityZ() method, hoping that it would lead me to where gravity is actually implemented, but it only led me to this line of code:
GlobalCreatePhysicsDelegate.Broadcast(this);
Which I’m guessing means that the physics in Unreal acts on objects, so I would need to change code there to accomplish what I wanted to. Still, I saw a video someone made, where he did exactly what I was looking for, and he supposedly only extended the Character Movement component. Here’s a link to the video. Of course I wouldn’t need anything this complicated, only the ability to walk on a sphere. (I want to make a game set on a small planet, kind of like the Little Prince)
Since I’m a complete newbie I would also appriciate just general help on how I might go about learning about how some parts of the engine work. I tried going through the documentation, but I didn’t have much success.