natiny_pivot_destroy
void natiny_pivot_destroy(NatinyPivot pivot);
Destroys a pivot and all entities parented below it.
Parameters
| Name | Type | Description |
|---|---|---|
pivot |
NatinyPivot |
Pivot handle from natiny_pivot_create |
Example
natiny_pivot_destroy(turret);
Notes
- Destruction is recursive. Each descendant is destroyed according to its entity type and releases its owned resources.
- To preserve a child, detach it first with
natiny_entity_set_parent(child, 0). Its local transform becomes its world transform. - The pivot handle is invalid after this call. Reusing it or passing a handle that does not refer to a pivot has no effect.