PhysicsWorldSettings3D class final

How a world is made.

Constructors

PhysicsWorldSettings3D({Vector3? gravity, List<int>? layerMasks, int maxBodies = 10240, bool reportContactStay = false, bool reportActivation = false})
A world with gravity (0, 9.81, 0) — down, since +Y is down — and every layer colliding with every other unless layerMasks says otherwise.

Properties

gravity → Vector3
Gravity, m/s².
final
hashCode → int
The hash code for this object.
no setterinherited
layerMasks → List<int>
The collision grid, one row per layer: bit b of layerMasks[a] is set when layer a collides with layer b. A pair collides only when both rows say so.
final
maxBodies → int
The most bodies it can hold.
final
reportActivation → bool
Whether bodies report falling asleep and waking up.
final
reportContactStay → bool
Whether touching pairs report a stay event after every step.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

standardGravity → const double
Earth's gravity, m/s².