Area2D orbits using point gravity

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Artemas

I’m trying to make my RigidBody2D spaceships orbit my area2D planets. I have them set up as point gravity areas and that works well, but the orbits it creates are always elliptical or the ship just slingshots out of orbit. Ideally the spaceship would enter the area2D zone and begin orbiting in a circle.

https://imgur.com/a/ebdJS9O
red line is what currently happens, green is what I want.

if I use the linear dampener in the area the velocity eventually zeros out. is there a way to dampen only the vector going perpendicular to the center of the planet so that he orbit would circularize?

I have also tried stacking area2D zones with the gravity points combined to create zones of intensifying gravity as you get closer to the center and that works a bit better, but I think using some kind of equation to increase the gravity as you get closer to the point would work best.

I’m new to Godot so sorry if the question is dumb, but I am enjoying it so far.