rotateShape()
Purpose
Apply rotation to a shape drawn with drawShape()
Description
Rotates a shape by a given number of degrees or radians
Syntax
rotateShape( shape, amount )
Arguments
shape Handle which stores the shape to move
amount Number of degrees or radians to rotate each frame. Negative numbers produce anti-clockwise rotation
Example
shape = createBox( gwidth() / 2, gheight() / 2, 200, 300 )
// rotate the box with the left control stick y axis
loop
clear( grey )
j = controls( 0 )
rotateShape( shape, j.ly )
drawShape( shape )
update()
repeat
Associated Commands
copyShape(), createBox(), createCircle(), createCurve(), createLine(), createLineStrip(), createPoly(), createStar(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeRotation(), getShapeScale(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()