Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setSpriteRotation()

Purpose

Rotate a sprite

Description

Set the rotation angle of a sprite

Syntax

setSpriteRotation( sprite, angle )

sprite.rotation = angle

Arguments

sprite handle of the created sprite

rotation angle in default units

Example

image = loadImage( "Untied Games/Enemy small top C", false )
ship = createSprite()
setSpriteImage( ship, image )
lastpos = { gWidth() / 2, gHeight() / 2 }
setSpriteLocation( ship, lastpos )
setSpriteScale( ship, { 8, 8 } )

for angle = 0 to 360 loop
    clear()
    setSpriteRotation( ship, angle )
    drawSprites()
    update()
repeat

Associated Commands

getSpriteRotation(), getSpriteRotationSpeed(), setSpriteRotationSpeed()

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.