Destroy a model

Hello, I want to know How I can destroy a model load.

I load the model thus:

environ = loader.loadModel("models/environment")  
environ.reparentTo(render) 
environ.setScale(0.25,0.25,0.25) 
environ.setPos(-8,42,0)  

Thanks……………

in your case


# make sure your reference to the model is gone
environ = None # or 'del environ', really depends on your code

# tell loader to remove the model
loader.unloadModel('models/environment')

cheers,
kaweh

Note that these are really optional. Usually you can just forget about a model (once it has been removed from the scene graph), and it will go away on its own.

David