natiny.entity.set_scale

Lua
natiny.entity.set_scale(node, sx, sy, sz)

Sets the scale of a node.

Parameters

Name Type Description
node number Entity handle (e.g. model, body, sound source or camera)
sx number Scale factor along X axis
sy number Scale factor along Y axis
sz number Scale factor along Z axis

Example

Lua
local cube = natiny.model.create(natiny.mesh.cube(1))
natiny.entity.set_scale(cube, 2.0, 2.0, 2.0)

Notes

  • A scale of 1.0 on all axes is the default (no scaling).