I recently tried to attempt to make gravity like the earth’s gravity, how its always being pulled towards a point.
I was pretty successful at this, the method I used was to find the angle of elevation from the centre of gravity to the player on all 3 axis’ then apply the gravity accordingly so that the bigger angle got more gravity and the smaller ones got less gravity but making sure that the combined gravity always equalled 9.8. I also chucked in a quick method to find out which way the gravity should be applied.
My issue is that when the player is near the poles of my “earth” (1 or 2 blender units to it) it gets sucked towards them.
I’m not sure why this happens, perhaps if someone can look over my .blend or code they could help me? I’ve put a grid over the sphere so the poles can be found easier (the poles are the top and bottom parts, where all the lines converge). Arrow keys to move the cube.
spherical_gravity.blend - 1033kb