TreeCollision not working...

blackskull

04-04-2010 15:21:49

Well i create a tree collision ground like that:

Ogre::Vector3 size(10.0,1.0,10.0);
Ogre::SceneNode* node = mSceneMgr->getRootSceneNode()->createChildSceneNode();
Ogre::Entity* ent = mSceneMgr->createEntity( "floorobj", "box.mesh" );
node->attachObject( ent );
node->setScale( size );

OgreNewt::CollisionPtr col( new OgreNewt::CollisionPrimitives::TreeCollision(mWorld, ent, true, 0));
OgreNewt::Body* floorbody = new OgreNewt::Body( mWorld, col );
floorbody->attachNode(node);
floorbody->setPositionOrientation( Ogre::Vector3::ZERO, Ogre::Quaternion::IDENTITY );
as said in this tutorial but the objects are just passing trough the ground...
if I make it as a box collision with the same size works fine, but tree collision doesn't...
(: