I’ve never tried a physicEngine in BJS until now, and my current objective is to have a satellite on its orbit.
So for now here what I’ve done:
I set gravity to 0
planet have a mass of 0, to not move
I create a DistanceJoint to stick the satellite on its orbit
Of course it seems I’m totally wrong but I’m now stuck in my problem.
Are some guys here already tried to play with physics into space?
At start I was thinking about keeping our loved gravity to -9.81, and having the satellite friction to 0 (no air), plus a linear force onto this satellite, so it have a sufficient velocity to not fall into earth - like IRL in fact… but yeah, the satellite just fall into the infinity.
Well I think you try to reproduce the real world with a JS based physics engine ;D
Adding @trevordev to see if he has an idea to improve your simulation
Actually, I have in the mind to made a mini-game for explaining basics orbital mechanics. So doing fake will be probably too difficult to keep realistic, this is why I started playing with PhysicEngine.
But OK I understand, it’s maybe out-of-specs ahah. Waiting for trevordev
Yup I would use forces instead of a joint to better simulate, you could take a look at this https://playground.babylonjs.com/#JYN2EP#12 , its using -9.8 as a constant because I’m too lazy to use the real gravitational equation but you get the idea.