natiny.pivot.destroy
natiny.pivot.destroy(pivot)
Destroys a pivot and all entities parented below it.
Parameters
| Name | Type | Description |
|---|---|---|
pivot |
number |
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.