body and scene node

jensa

25-02-2008 16:37:21

Hello
Please :cry: , how can' I attached the body of NxOgre with the entity and scene node of Ogre?

NickM

25-02-2008 17:30:44

Hello
Please :cry: , can you take a better look at an NxOgre Body.

jensa

25-02-2008 17:48:46

Thanks
but , When i used mBody->mEntity(); I have this error

.\main.cpp(181) : error C2248: 'NxOgre::Body::mEntity' : cannot access protected member declared in class 'NxOgre::Body'
c:\ogresdk\nxogre\include\NxOgreBody.h(52) : see declaration of 'NxOgre::Body::mEntity'
c:\ogresdk\nxogre\include\NxOgreBody.h(28) : see declaration of 'NxOgre::Body'

jensa

25-02-2008 18:01:14

and when i used this code
Body* mBody = mScene->createBody("ninja.mesh",new CubeShape(2.0f), Vector3(0,0,0), "Mass: 50");
SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode( "RobotNode", Vector3( 500, 70, 500 ) );
ent=mBody->getEntity();
node->attachObject(ent );

i have this error

"object already attached to a scenenode or a bone in scenenode::attacheobject ....."

SiWi

25-02-2008 18:45:08

I didn´t quite understand you. Could you explain use a little more detailed what you want to achieve.

betajaen

25-02-2008 18:47:41

Or at least read the manual on Ogre.

jensa

25-02-2008 18:54:43

What is the relation between Body* in NxOgre and SceneNode in Ogre?
How can' I create a physics body and used' it with the scene of Ogre (for manipulate the animation….)?
Sorry for my English.

betajaen

25-02-2008 19:07:03

By reading the FAQ, Shortguide and obviously you don't know much about Ogre - the Ogre Tutorials.

Artic_Ice83

25-02-2008 21:51:47

maybe gives you the error because the NxOgre::Body have a physics actor, an entity and also a node...otherwise how can you see it?how does ogre works? :lol: