OgreMage
11-05-2008 19:04:24
Hello NxOgre'ers, I have a NxOgre C++ question in regards to destroying a Body created with createBody.
Typically, the way Body's are created appears to be:
My question is, when the body is deleted (I currently use mWorld->destroyScene but have used mPhysicsScene->destroyBody in the past), is the CubeShape deleted? It was created with new, so how is it being deleted? And if not, what is the suggested way to do so cleanly (i.e. a scene with many Body's).
Thank you dearly,
OM
Typically, the way Body's are created appears to be:
Body* boxBody = mPhysicsScene->createBody("box.mesh", new CubeShape(1,1,1), Vector3(0,0,0), "mass: 10");
My question is, when the body is deleted (I currently use mWorld->destroyScene but have used mPhysicsScene->destroyBody in the past), is the CubeShape deleted? It was created with new, so how is it being deleted? And if not, what is the suggested way to do so cleanly (i.e. a scene with many Body's).
Thank you dearly,
OM