Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thank you!

the gravity simulation part is very straightforward, in godot c# it looks something like this: 

https://gist.github.com/gabtorok/a13c8522c4b17f8fe020403dd82e62ba

Bit crude, but it's fast enough, basically it's high-school physics: to calculate the acceleration for each object I calculate how every other object's gravity affects them.

(+1)

Thanks for sharing! I didn’t think you’d have to use a 3D vector for what appears to be a 2D plane but that makes a lot of sense now. You definitely did this a lot cleaner than me haha. My spaghetti code barely had everything working lol