natiny_entity_move
void natiny_entity_move(NatinyEntity node, uint32_t space, float dx, float dy, float dz);
Moves a node by a delta offset in the given coordinate space.
Parameters
| Name | Type | Description |
|---|---|---|
node |
NatinyEntity |
Entity handle |
space |
uint32_t |
NATINY_SPACE_LOCAL or NATINY_SPACE_WORLD |
dx |
float |
Offset along X axis |
dy |
float |
Offset along Y axis |
dz |
float |
Offset along Z axis |
Example
natiny_entity_move(node, NATINY_SPACE_LOCAL, 0.0f, 0.0f, -1.0f);
Notes
NATINY_SPACE_LOCALrotates the delta by the node's local orientation before adding it.NATINY_SPACE_WORLDinterprets the delta along world axes.- World-space conversion assumes a parent with unit scale. With a scaled parent, the resulting world displacement is not exact.