0 votes

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.

Godot version 3.3.3
in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.