destroyEntity problem with PLSM2 ?

dedesite

14-05-2006 20:07:30

Hello,
I post here a copy of my post of the official forum because I think my problem might come from the fact I use PLSM2 and not comes from OGRE.
I know, I use an old version of PLSM2, if this bug is know and fix in the further version it would be great! I had just to compile succefully the last sources and everything will be allright!

My app crashes when using destroyEntity. I use 1.0.7 version of OGRE.

Here is my entity creation code :

Code:

void createMesh(String name, String meshName, Vector3 position)
{
Entity* entity = mSceneMgr->createEntity(name, meshName);

mCurrentObject = mSceneMgr->getRootSceneNode()->createChildSceneNode(name);
mCurrentObject->attachObject(entity);
mCurrentObject->setPosition(position);
mCurrentObject->setScale(10.0f, 10.0f, 10.0f);
}


And my destroy code :

Code:

Entity *pEnt = (Entity*)mCurrentObject->getAttachedObject(mCurrentObject->getName());
mCurrentObject->detachObject(pEnt);
mSceneMgr->removeEntity (pEnt->getName());
mSceneMgr->destroySceneNode(mCurrentObject->getName());


The application just crash, without any error and nothing wrong in the log... I don't understand what appening, I have this problem since a long time and it would be great if I can resolved it because it's important for my app and I will present it monday for the school. It's the only bug that I didn't fix.

Thank for further help, greetings,

dede

tuan kuranes

15-05-2006 13:40:34

Does it happend when using standard terrain scene manager ?