PhysicsEntity class final

Demo-level object that couples a reusable RigidBody with reset behavior.

Applications can build their own entity classes around PhysicsWorld and RigidBody. This class is intentionally small and is not required by the core physics API.

Constructors

PhysicsEntity(PhysicsWorld _world, {required RigidBody body, required PhysicsTransform initialTransform})
Creates an entity owned by _world.

Properties

body RigidBody
The native body represented by this entity.
final
hashCode int
The hash code for this object.
no setterinherited
initialTransform PhysicsTransform
Transform restored by reset.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transform PhysicsTransform
Reads the current transform from Jolt.
no setter

Methods

addImpulse(Vector3 impulse) → void
Applies an instantaneous physical push.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Restores the initial transform and initial velocities.
toString() String
A string representation of this object.
inherited

Operators

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