Large world space coordinates will introduce inaccuracy, courtesy of floating point arithmetic rounding: epsilon.
Floating point errors in deep space caused by large world coordinates and small frame times is affecting movement physics and rendering. Meaning the deeper in space we go, the more "stuff" begins to break.
According to the documentation:
Caution: Box2D works best with world sizes less than 2 kilometers. Use b2World::ShiftOrigin to support larger worlds.
The universe by contrast, is a little bit bigger than 2km....
To solve this we can use a local coordinate system and a large global coordinate system. see: 'Floating Origin' -> b2World::ShiftOrigin
Large world space coordinates will introduce inaccuracy, courtesy of floating point arithmetic rounding: epsilon.
Floating point errors in deep space caused by large world coordinates and small frame times is affecting movement physics and rendering. Meaning the deeper in space we go, the more "stuff" begins to break.
According to the documentation: Caution: Box2D works best with world sizes less than 2 kilometers. Use b2World::ShiftOrigin to support larger worlds.
The universe by contrast, is a little bit bigger than 2km....
To solve this we can use a local coordinate system and a large global coordinate system. see: 'Floating Origin' -> b2World::ShiftOrigin