Im trying to figure out how to change the players center of gravity so they can do things like walk on specific walls. I already know about EgoMooses Gravity Controller, and have tried editing the code, but alot of it is coded in a way that I cant understand very well, so I want to make my own code that I can understand better. I just want help knowing how the characters center of gravity gets changed. Like what Body Movers are used and how the rotation works. Or how to edit EgoMooses gravity controller to only activate when I tell it to.
I think by changing “center of gravity” you probably mean “how our character seems to be right side up, even if it is upside down”. I will give some explanations. A new gravity can be created with two things : a character rotation and a force to simulate a gravity force to the new 'bottom" direction.
For my recelection, EgoMoose had firstly (the first gravity controller) changed directly the CFrame of the character to change his orientation (by disabling the auto character rotation with the “plateformStanding” of the humanoid) , and he used a “bodyForce” to make gravity force.
But the last gravity controller use “AlignOrientation” (that allows to rotate the player without having to activate the “PlateformStand”) and a AlignPosition. The both use a complex system that I will slighty simplify. The script make a simulation of the player’s character, and the alignOrientation and alignPosition force the player’s character to follow this simulation.
I was not go in depth explanations but I hope that at least it helped you to understand !