NickM
11-01-2008 21:43:08
Hi, I'm creating an NxOgre Body using a mesh called 'xxx.mesh', which looking through the NxOgre code, creates an Ogre::Entity called 'xxx.mesh-0'
I then change the name of the body using NxOgre::Body::setName() and then go on to create another body using the same mesh, during the creation NxOgre checks whether a body already exists with the name 'xxx.mesh' but of course it doesn't because I changed it, NxOgre goes ahead and creates the body, then tries to create another Ogre::Entity with the name 'xxx.mesh-0'. An Entity with that name already exists so Ogre finds the mistake and complains.
I guess NxOgre needs to change the Entity name as well when you call Body::setName()
Is there a way to set the name of a Body before it's created?
I then change the name of the body using NxOgre::Body::setName() and then go on to create another body using the same mesh, during the creation NxOgre checks whether a body already exists with the name 'xxx.mesh' but of course it doesn't because I changed it, NxOgre goes ahead and creates the body, then tries to create another Ogre::Entity with the name 'xxx.mesh-0'. An Entity with that name already exists so Ogre finds the mistake and complains.
I guess NxOgre needs to change the Entity name as well when you call Body::setName()

Is there a way to set the name of a Body before it's created?