Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

getShapeRotation()

Purpose

Find the rotation of a shape in degrees or radians

Description

Returns the amount of rotation applied to a shape drawn with drawShape()

Syntax

rotation = getShapeRotation( shape )

Arguments

shape Handle which stores the shape in question

rotation Handle which stores the amount of rotation applied to the supplied shape

Example

r = gheight() / 2
a = 0
points = []

for i = 0 to 20 loop
    x = gwidth()/2 + cos(a) * r
    y = gheight()/2 + sin(a) * r
    points[i] = {x, y}
    r -= 30
    a += 36
repeat

lineStrip = createLineStrip(points)
setShapeColour(lineStrip, white)

loop
    clear()
    rotateShape(lineStrip, 1)
    rotation = getShapeRotation(lineStrip)
    drawShape(lineStrip)   
    print(rotation)
    update()
repeat

Associated Commands

copyShape(), createBox(), createCircle(), createCurve(), createLine(), createLineStrip(), createPoly(), createStar(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeScale(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), 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.