Dev - Lua Libraries

Lua Command: s3sprite.setScale

Parameters

Return Values

void

- no return values

Signature

s3sprite.setScale(int spriteID, float widthScale, float heightScale)

Description

Sets the scale of the sprite with the given spriteID. The scale is the size relative to the original image size. A scale of 1.0 (default) means that the sprite will be displayed in the original size of the used source image. The scale can be specified separately for the width (widthScale) and height (heightScale). Negative values can be used for mirroring.

Note:

A widthScale and heightScale of 1.0 mean that the sprite has the original size of its source image

Note:

Negative scales can be used for mirroring

Note:

Use s3sprite.setSize if you want to set the absolute size in pixels