body name is always unamed_xx ?

tsky

12-02-2007 14:30:55

Hi,

i try to create my bodies in this manner:



[NxOgre 0.4RC3]

Ogre::String strName;
Ogre::String strMeshName;
Ogre::String strParentName;

.
.
.
pCubeShape = getCubeShape(pChildElem);
pShapeGroup->addShape(pCubeShape);
.
.
.

pBody = m_pNxOgreSceneRef->createBody(strName,
strMeshName,
pShapeGroup,
fDensity,
m_Pose);



the variable are correct set, but the body always result me an "unamed_xx" name !?

Anyone idea why ?

tom

betajaen

12-02-2007 15:04:22

If the string is blank, then NxOgre will generate a name from you. So most likely the strName - is blank.

tsky

12-02-2007 15:18:37

If the string is blank, then NxOgre will generate a name from you. So most likely the strName - is blank.

thanx for answer.

Right in your code the blank will be catched. But as i wrote the strName is not blank. The name i want to have is in.

Meanwhile i checked my stupid error.

As an mistake i already got an scenenode with the name i want to have. <- the error!

My opinion (next error) was that nx uses the existing node - in my case that would be the best - but nx creates an autonamed node... for me :-(

Thanks for answer. [SOLVED]

betajaen

12-02-2007 16:05:30

You can use your own node if you want to:

mScene->createBody(strName, strMesh, pShapeGroup, fDensity,params<rigidbody>("node: myNodeName"), m_Pose);