Skip to main content

Function: createPrismaticJointEcsSystem()

createPrismaticJointEcsSystem(physicsWorld): EcsSystem<[PrismaticJointEcsComponent], void>

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

Creates an ECS system that registers each entity's PrismaticJoint with physicsWorld while the entity carries a PrismaticJointId 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<[PrismaticJointEcsComponent], void>