natiny.physics.shutdown

Lua
natiny.physics.shutdown()

Destroys the world and every body in it.

Example

Lua
natiny.physics.shutdown()

Notes

  • Every body handle becomes invalid for physics calls. Manual physics shutdown does not destroy the corresponding entity nodes.
  • Do not reuse old body handles after initializing a new physics world.
  • Safe to call when physics was never started, and safe to call twice.
  • natiny.backend.init and natiny.backend.shutdown both do this for you; calling it by hand is for a program that wants the world gone earlier.