Physics3D constructor
Physics3D({})
3-D physics on engine, or on the platform's physics engine when that
is null, with workerThreads threads in its job system (below 0:
cores minus one). gravity is (0, 9.81, 0) — down — unless given.
addSystem false leaves adding system to a world to the game.
Implementation
Physics3D({
PhysicsEngine3D? engine,
Vector3? gravity,
this.workerThreads = -1,
this.maxBodies = 10240,
this.reportContactStay = false,
this.reportActivation = false,
this.addSystem = true,
}) : _given = engine,
gravity =
gravity ?? Vector3(0, PhysicsWorldSettings3D.standardGravity, 0);