PhysicsWorld class abstract interface

A simulation world backed by Jolt Physics on Android.

Create bodies with createBody, advance the simulation with step, and release native resources with dispose. Bodies belong to the world that created them and must not be passed to another world.

Properties

engineLabel String
Human-readable name of the active physics backend.
no setter
hashCode int
The hash code for this object.
no setterinherited
queries PhysicsQueries
Spatial queries such as ray casting against collider shapes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addImpulse(RigidBody body, Vector3 impulse) → void
Applies an instantaneous impulse to a dynamic body.
createBody(RigidBodySettings settings) RigidBody
Inserts a rigid body into this world.
destroyBody(RigidBody body) → void
Removes body from the simulation and releases its native resources.
dispose() → void
Releases this world's native resources and all remaining bodies.
getAngularVelocity(RigidBody body) Vector3
Reads the current rotation speed of body in radians per second.
getLinearVelocity(RigidBody body) Vector3
Reads the current movement of body in world units per second.
getTransform(RigidBody body) PhysicsTransform
Reads the current world-space position and orientation of body.
moveKinematic(RigidBody body, PhysicsTransform target, double deltaSeconds) → void
Moves a kinematic body toward target over deltaSeconds.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAngularVelocity(RigidBody body, Vector3 velocity) → void
Replaces the current angular velocity of body.
setLinearVelocity(RigidBody body, Vector3 velocity) → void
Replaces the current linear velocity of body.
setTransform(RigidBody body, PhysicsTransform transform, {bool activate = true}) → void
Teleports body to transform.
snapshotBodies() List<RigidBodySnapshot>
Captures all registered bodies for debug overlays and inspectors.
step(double deltaSeconds) → void
Advances the simulation by deltaSeconds.
toString() String
A string representation of this object.
inherited

Operators

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