Skip to main content

Function: createRevoluteJointEcsSystem()

createRevoluteJointEcsSystem(physicsWorld): EcsSystem<[RevoluteJointEcsComponent], void>

Defined in: physics/systems/revolute-joint.system.ts:22

Creates an ECS system that registers each entity's RevoluteJoint with physicsWorld while the entity carries a RevoluteJointId component, and removes it once the entity stops matching (or is removed).

Must be registered with the EcsWorld before createPhysicsSyncEcsSystem (or with an earlier registrationOrder), so newly-added joints are registered before createPhysicsSyncEcsSystem steps physicsWorld for the tick.

Parameters

physicsWorld

PhysicsWorld

The physics world to register joints with.

Returns

EcsSystem<[RevoluteJointEcsComponent], void>