skeleton:getSize()

Type: function

Overview:


Returns the current size of the skeleton and the offset from the origin point.

Syntax:


local size = skeleton:getSize()

Return value:


size – A table with the following fields:

  • width: number – The width of the skeleton.

  • height: number – The height of the skeleton.

  • offsetX: number – The offset from the origin point on the X-axis.

  • offsetY: number – The offset from the origin point on the Y-axis.

Example:


local size = skeleton:getSize()
print("Size:", size.width, size.height, size.offsetX, size.offsetY)