natiny_entity_set_position
void natiny_entity_set_position(NatinyEntity node, uint32_t space, float x, float y, float z);
Sets the position of a node in the given coordinate space.
Parameters
| Name | Type | Description |
|---|---|---|
node |
NatinyEntity |
Entity handle |
space |
uint32_t |
NATINY_SPACE_LOCAL or NATINY_SPACE_WORLD |
x |
float |
Position X |
y |
float |
Position Y |
z |
float |
Position Z |
Example
natiny_entity_set_position(node, NATINY_SPACE_WORLD, 2.0f, 0.0f, -5.0f);
Notes
NATINY_SPACE_LOCALsets the stored parent-relative position.NATINY_SPACE_WORLDconverts an absolute world position into parent space.- The world conversion assumes a parent with unit scale; with a scaled parent, the resulting world position is not exact.