natiny.entity.get_scale

Lua
natiny.entity.get_scale(node) -> sx, sy, sz

Returns the scale factors of a node, as three separate numbers.

Parameters

Name Type Description
node number Entity handle (e.g. model, pivot, body, sound source or camera)

Returns

Type Description
number Scale factor along X
number Scale factor along Y
number Scale factor along Z

Example

Lua
local sx, sy, sz = natiny.entity.get_scale(cube)
natiny.entity.set_scale(cube, sx * 1.1, sy * 1.1, sz * 1.1)