mwg API
    Preparing search index...

    Interface PhysicsBody

    a rigid body: a circle or an axis-aligned box with mutable position and velocity

    interface PhysicsBody {
        angle: number;
        isStatic: boolean;
        label: string;
        position: { x: number; y: number };
        velocity: { x: number; y: number };
    }
    Index
    angle: number

    rotation in radians; never integrated, a display offset for sprites

    isStatic: boolean

    true for ground and anchors: infinite mass, never moves

    label: string

    collision name, '' when unnamed

    position: { x: number; y: number }

    centre in world units; assign to teleport (velocity is left untouched)

    velocity: { x: number; y: number }

    world units per second; assign to shove