A manager to efficiently detect object-intersections in 2D.
Usage looks like this:
const collision = new CollisionEngine();// add static collidercollision.addCollider(Collider.createStatic().addShape(new CollisionCircle().setValues(310, 310, 100)));// add dyanmic collidercollision.addCollider(Collider.createDynamic().addShape(new CollisionLine().setValues(310, 310, 500, 310)));// scan for collisionconst scanRect = new CollisionRect(0, 0, 100, 50);const contacts = collision.scan(scanRect);
Instances of CollisionContact are part of object pooling. Please check CollisionContact docs for details.
CollisionContact
Private
Static
Generated using TypeDoc
A manager to efficiently detect object-intersections in 2D.
Usage looks like this:
Instances of CollisionContact are part of object pooling. Please check CollisionContact docs for details.
See
CollisionContact