Function

fixed

(fixed?: boolean): FixedComp

Make a game obj unaffected by camera or parent object transforms, and render at last. Useful for UI elements.

param fixed- Default fixed value.

// this will be be fixed on top left and not affected by camera
const score = add([
    text(0),
    pos(12, 12),
    fixed(),
])

returns The fixed comp.

since v2000.0

group Components

subgroup Rendering

kaplay logo

Components