Set false to skip update() calls.
Planck.js body instance.
Identifier for getLogic(). Defaults to class name.
OptionalonCalled when collision begins.
OptionalonCalled when collision ends.
Body configuration.
Parent physics world.
Apply continuous force at a point. Force is in pixels/sec².
Force vector in pixels
Optionalpoint: PointApplication point (defaults to center of mass)
Apply instant impulse at a point. Good for jumps, explosions.
Impulse vector in pixels
Optionalpoint: PointApplication point (defaults to center of mass)
Apply rotational torque.
Removes body from physics world.
Get rotation speed (radians/sec).
Get body mass (kg in physics units).
Get current velocity (pixels/sec).
True if body is active (not sleeping).
True if body is sleeping (inactive).
Set rotation speed (radians/sec).
Wake up or put body to sleep.
Set linear velocity directly.
Velocity in pixels/sec
Updates physics body from sprite position/rotation.
Logic component that syncs a PIXI entity with a Planck.js physics body. Handles position/rotation sync, collision filtering, and force application.
Example