Physics library question

Can the physics module do gravity from a specific shape/point? I didn’t see anything specific in the docs, or in the examples

That would be interesting. You could place the Sun in the center of the screen and have the planets orbit it. But then I don’t think that would work because the precision of any calculation might not be exact enough with only 32 bit precision. The orbits would become unstable. Will we ever get 64 bit precision, or the option to select 32 or 64 bit based on if we want speed or precision.

So that’s a no. Thanks!

.@athros It’s perfectly possible I think @dave1707 was talking mostly about a larger scale system which might require more precision depending on scale.

What you need to do is turn off gravity and them apply your own gravity using the applyForce method on bodies based on the distance and direction of the gravity source that will influence a given body. You could have a cutoff distance and multiple sources of gravity to create interesting effects like in Mario Galaxy or Gravity Ghost.

You’re right @John. My point was with the precision of the calculations needed for a solar system and the scale needed to make it. But having gravity points (multiple) could make for some interesting programs.