Vectrex
01-06-2006 18:36:10
I'm tring to add entites from an OSM scene file into a tree collision, much like this post does with dotScene http://www.ogre3d.org/phpBB2addons/view ... t=dotscene
but my collision mesh (F3) is misaligned to the visible geometry. Here's the code
- does this make loads of seperate tree bodies? If so is there a way to add new entities to an exist tree collision or doesn't this matter?
but my collision mesh (F3) is misaligned to the visible geometry. Here's the code
void TrackManager::OnEntityCreate(Ogre::Entity *pEntity, TiXmlElement* pEntityDesc){
OgreNewt::Body* body = NULL;
OgreNewt::Collision* col = NULL;
col = new OgreNewt::CollisionPrimitives::TreeCollision(mOgreNewtWorld, pEntity->getParentSceneNode(), false);
body = new OgreNewt::Body(mOgreNewtWorld, col);
body->attachToNode(pEntity->getParentSceneNode());
delete col;
}
- does this make loads of seperate tree bodies? If so is there a way to add new entities to an exist tree collision or doesn't this matter?