Acid_Gambit
30-03-2007 22:54:51
I have a problem with one of my custom meshes (terrain of 500x10x500). When I create a TreeCollision body for my node it is only covering about 50% of the node width (see screenshot for explanation).

I am sure the collision does not work for the part that doesn't show the debug lines (tested by pushing an object over the terrain).
O, and here's my code:
I am sure the collision does not work for the part that doesn't show the debug lines (tested by pushing an object over the terrain).
O, and here's my code:
Entity* floor;
SceneNode* floornode;
floor = mSceneMgr->createEntity("Floor", "terrain500x10x500.mesh" );
floornode = mSceneMgr->getRootSceneNode()->createChildSceneNode( "FloorNode" );
floornode->attachObject( floor );
floor->setMaterialName( "Simple/BeachStones" );
floor->setCastShadows( false );
OgreNewt::Collision* col = new OgreNewt::CollisionPrimitives::TreeCollision( m_World, floornode, true );
OgreNewt::Body* bod = new OgreNewt::Body( m_World, col );
delete col;
bod->attachToNode( floornode );
bod->setPositionOrientation( Ogre::Vector3(0.0,-60.0,0.0), Ogre::Quaternion::IDENTITY );