static

Sets the collider to not be moved by other colliders that hit it.

Examples

const A = $.makeCircleCollider($.w/2-30,50,20);
A.fill = "#54d89f";
A.direction = 180;
A.speed = 30;

const C = $.makeCircleCollider($.w/2+30,50,20);
C.fill = "rgba(160,54,68,1)";
C.direction = 180;
C.speed = 30;

const floor = $.makeBoxCollider( $.w/2, $.h-20, $.w, 20);
floor.static = true;
floor.fill="#3b444d";

function update() {
    A.collides(floor);
    C.collides(floor);
    A.draw();
    C.draw();
    floor.draw();
}