Skip to content

shapeCenter

shapeCenter(shape, worldPos, angle, ppu): Vec2

Defined in: physics/ColliderShape.ts:67

The shape’s world-pixel centre = the entity’s world position plus its collider offset (metres × ppu) rotated by the entity angle. This is the offset+rotation transform that used to be re-implemented in PhysicsDebugDraw and ViewportController.

ColliderShape

Vec2

number

number

Vec2