3D rigidbody movement around a sphere in Godot4

So there is a gravity constant in Godot, but your CharacterBody3D only uses it in its calculations if you want it to. The easiest thing to do would be to create a Marker3D at the center of your planet. (You can also use a Node3D - markers are just easier to see in the editor UI.) Then every frame update a gravity_vector that travels from your CharacterBody3D’s global_position to the Marker3D’s global_position. It will always point “down” and can be updated every frame.

Check out this thread where we’ve been discussing alternate gravities and everything that’s involved with them. @RoseWoodKitty has already created a lot of code and posted it that would be helpful to you.

If the tutorials are older than Godot 4.0, a lot of things have changed. Even more things changed in 4.3 and 4.4.

Gimbal lock is avoided by having two nodes that separately rotate the camera. Typically you have a SpringArm3D that only rotates on the y-axis and a Camera3D as a child node that only rotates on the x-axis.