natiny_entity_set_scale
void natiny_entity_set_scale(NatinyEntity node, float sx, float sy, float sz);
Sets the scale of a node.
Parameters
| Name | Type | Description |
|---|---|---|
node |
NatinyEntity |
Entity handle |
sx |
float |
Scale factor along X axis |
sy |
float |
Scale factor along Y axis |
sz |
float |
Scale factor along Z axis |
Example
NatinyModel cube = natiny_model_create();
natiny_model_set_mesh(cube, natiny_mesh_cube(1.0f, 1.0f, 1.0f, 1));
natiny_entity_set_scale((NatinyEntity)cube, 2.0f, 2.0f, 2.0f);
Notes
- A scale of
1.0fon all axes is the default (no scaling).