3 ms·
They probably aren't doing anything special with gravity - they're just applying a central 1/r^2 force to anything that touches the sensor region (the atmospher
by bermanoid 15y ago
They probably aren't doing anything special with gravity - they're just applying a central 1/r^2 force to anything that touches the sensor region (the atmosphere, in this case). One of the Box2d testbed demos has a similar example, it's very simple to do.
The frictional force is also pretty simple, likely just Box2d's linearDamping term, which very loosely models drag and exponentially slows down objects. Box2d uses symplectic Euler integration, which tends to be pretty good about conserving energy; it definitely wouldn't cause that much deflection from a stable orbit if the force was central.