mamairaja
11-10-2009 13:05:33
I am a new comer to nxogre and this forum.
So Hi to all,
I have just started nxogre and have followed the tutorial series. Upto now I have managed to run everything. But having a small problem with when ataching a ogre scene node to OGRE3DBody.
Following is my code and the output is in the following screen shot. As u see the size of the shape is extremely large and tree is not touching the ground. I think the way I have made the new NxOgre::Capsule(boxRadiosu,boxHeight) is wrong. Can you please help me complete this with proper visualization with proper physics
Thank You in adavance!!!
So Hi to all,
I have just started nxogre and have followed the tutorial series. Upto now I have managed to run everything. But having a small problem with when ataching a ogre scene node to OGRE3DBody.
Following is my code and the output is in the following screen shot. As u see the size of the shape is extremely large and tree is not touching the ground. I think the way I have made the new NxOgre::Capsule(boxRadiosu,boxHeight) is wrong. Can you please help me complete this with proper visualization with proper physics
Thank You in adavance!!!
//-----
NxOgre::RigidBodyDescription tree_desc;
tree_desc.mMass = 1000;
SceneNode *treeNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("TREE_NODE");
Entity* treeEnt = mSceneMgr->createEntity( "TREE_ENT", "myTree3.mesh");
treeNode->attachObject( treeEnt );
Ogre::Real boxHeight = treeEnt-> getBoundingBox().getSize().y;
Ogre::Real boxRadiosu = treeEnt-> getBoundingBox().getSize().z;
OGRE3DBody* treeBody = mRenderSystem->createBody(new NxOgre::Capsule(boxRadiosu,boxHeight), NxOgre::Vec3(20,2,20), treeNode, tree_desc);
//------