rotate(a?: number): RotateComp

Rotates a Game Object (in degrees).

parama- The angle to rotate by. Defaults to 0.

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

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

returnsThe rotate comp.

sincev2000.0

kaplay logo

Misc

Layer