deleting bodies in Ninja_Walking_Character[SOLVED]

feras32

24-11-2008 17:20:34

Hi

i am using the code from
http://www.ogre3d.org/wiki/index.php/Ni ... _Character

and i want to delete "_torso" and "_feet" bodies manually so i used this

if (input->isKeyDown(KC_N))
{
delete _feet;
delete _torso;
delete joint;
delete torsoTrans;
delete torsoGeom;
delete feetGeom;
delete feetTrans;
}


but it gives runtime error . what's wrong?
i didnt find any thing about deleting ogreode bodies in the wiki.

rewb0rn

03-12-2008 09:03:44

try to delete them in reverse order. Think you cant delete bodies that are still used in the geometries.

feras32

03-12-2008 11:10:14

okay, thank you very much ! :D