Skip to content

shapeCenter

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

Defined in: physics/ColliderShape2D.ts:71

The shape’s world-pixel centre = the entity’s world position plus its collider offset (metres × ppu) rotated by the entity angle. Every drawer of a collider goes through here, so a gizmo and the solver cannot disagree about where the shape is.

Collider2DShape

Vec2

number

number

Vec2