natiny.entity.set_scale
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
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.0on all axes is the default (no scaling).