Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setShapeRotation()

Purpose

Sets the rotation of a shape in degrees or radians

Description

Used to apply rotation to a shape drawn with drawShape()

Syntax

setShapeRotation( shape, amount )

Arguments

shape Handle which stores the shape to rotate

amount Float number of degrees (or radians) to rotate the shape by around the origin. Negative numbers apply counter-clockwise rotation

Example

gw = gWidth()
gh = gHeight()

shape = createBox( gw / 2, gh / 2, gw / 2, gh / 2 )
rotation = 0

loop
    clear()
    j = controls( 0 )
    rotation += j.ly
    setShapeRotation( shape, rotation )
    drawShape( shape )
    printAt( 0, 0, "Move left control stick up and down to rotate the shape." )
    printAt( 0, 1, "Current rotation angle: ", rotation, " degrees" )
    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(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.