2D Topdown deteriorating orbit?

I have 2 seperate gameobjects, and am trying to implement some sort of catch and orbit… essentially when object A hits object B’s circle collider trigger, I want object A to start orbiting B in a shrinking spiral… Essentially moving on the x/y plane like it was trapped by gravity. I keep trying methods using Transform.lookat and Transform.rotatearound, but it never seems to give me a 2d orbit like this. Kind of like an object falling into a whirlpool if your looking straight down at it. Any suggestions?

It would be nice to use physics2d since Im already adding force until it collides… then im just setting its velocity to 0 for now…

Do i need to change it and make it a child of the object to orbit in c# to properly orbit around it?

Been at it for a few hours and drawing blanks…


There is a script for orbital gravity. For a shrinking spiral object A would need to have a specific initial velocity vector.

And there is also another script I never tried but “Simple planetary orbits” sounds like it could fit your needs.