pomide
29-11-2006 04:34:30
I have recently started using OgreNewt. Currently I am trying to make a simple cylinder bounce on some 'terrain' I have. The terrain is merely a mesh of a hilly environment and not a heightmap. I created it in 3DS max if that matters... I followed the tutorial and set up everything correctly (I think). When the file runs, the cylinder falls towards the hilly terrain, but stops and hovers above it. Below is the type of collision I am using.
OgreNewt::Collision* hitTerrain = new OgreNewt::CollisionPrimitives::TreeCollision( mWorld, terrainNode, true );
OgreNewt::Body* base = new OgreNewt::Body( mWorld, hitTerrain );
base->attachToNode( terrainNode );
base->setPositionOrientation( Vector3(0,0,0), Ogre::Quaternion::IDENTITY );
Is there something I am missing as to why the cylinder does not hit the terrain? Any help would be appreciated.
OgreNewt::Collision* hitTerrain = new OgreNewt::CollisionPrimitives::TreeCollision( mWorld, terrainNode, true );
OgreNewt::Body* base = new OgreNewt::Body( mWorld, hitTerrain );
base->attachToNode( terrainNode );
base->setPositionOrientation( Vector3(0,0,0), Ogre::Quaternion::IDENTITY );
Is there something I am missing as to why the cylinder does not hit the terrain? Any help would be appreciated.