Function

rotate

(a?: number): RotateComp

Rotates a Game Object (in degrees).

param a- The angle to rotate by. Defaults to 0.

let bean = add([
    sprite("bean"),
    rotate(),
])

// bean will be upside down!
bean.angle = 180

returns The rotate comp.

since v2000.0

group Components

kaplay logo

Layer

Miscalenous