natiny.model.destroy

Lua
natiny.model.destroy(model)

Frees a model and the node that carried it.

Parameters

Name Type Description
model number Model handle

Example

Lua
natiny.model.destroy(box)

Notes

  • Everything parented to the model is destroyed with it, and so is everything parented to those, all the way down. Each one goes through the destroy its own kind has, so a child model gives back its parts, a child body leaves the physics world and a child source releases its voice - a subtree is freed as completely as its nodes would be one at a time.