I'm making a game with matter.js where you can create your own solar system, but instead of elliptical orbits like you'd expect where the planets would get close to the star and then swing around it, the planets always keep their orbits completely centered around the star. Is there any way I can fix this?
Note: I have tried to use the built-in Newtonian gravity, but it doesn't work at all with anything I've tried.
I got it to work, but instead of using MatterAttractors.Attractors.gravity, I had to copy and paste the gravity function inside the body. I have no idea why this worked and the other method didn't, though
I'm making a game with matter.js where you can create your own solar system, but instead of elliptical orbits like you'd expect where the planets would get close to the star and then swing around it, the planets always keep their orbits completely centered around the star. Is there any way I can fix this? Note: I have tried to use the built-in Newtonian gravity, but it doesn't work at all with anything I've tried.
For reference: