natiny_entity_get_position

C
void natiny_entity_get_position(NatinyEntity node, uint32_t space, float* x, float* y, float* z);

Writes the position of a node in the given coordinate space into three output parameters.

Parameters

Name Type Description
node NatinyEntity Entity handle
space uint32_t NATINY_SPACE_LOCAL or NATINY_SPACE_WORLD
x float* Receives position X; may be NULL
y float* Receives position Y; may be NULL
z float* Receives position Z; may be NULL

Example

C
float x, y, z;
natiny_entity_get_position(player, NATINY_SPACE_WORLD, &x, &y, &z);
natiny_entity_set_position(camera, NATINY_SPACE_WORLD, x, y + 1.7f, z);