I’m a bit confused in what order I should remove an object where I have the following parts:
SharedPtr node;
SharedPtr model;
SharedPtr vb;
SharedPtr ib;
SharedPtr geom;
PODVector elements;
SharedPtr object;
SharedPtr shape;
SharedPtr body;
So I’ve created a model with vertexbuffers and rigidbody. At a certain point I want to remove the object. What order should I use?
I thought I could use the node->Remove(), but that crashes the program since it causes null pointers.
Any advice?