TreeCollisionSceneParser doesn't parse everything :([SOLVED]

ervilha

22-09-2007 04:30:23

Hi,

I'm using OgreNewt in my school project.

I'm trying to build a TreeCollision for a parent scenenode, that have all the scenenodes loaded by the DotSceneLoader class.

Just like Demo02, i'm using TreeCollisionSceneParse:


CollisionPrimitives::TreeCollisionSceneParser* col = new CollisionPrimitives::TreeCollisionSceneParser(mWorld);
col->parseScene(dotSceneNode,true);

bodyDotSceneNode = new Body(mWorld,col,OUTROS);
delete col;

bodyDotSceneNode->attachToNode(dotSceneNode);
bodyDotSceneNode->setPositionOrientation(dotSceneNode->getPosition(),dotSceneNode->getOrientation());


The result of this code, is that almost every nodes get their rigid body, but some of them doesn't.



As you can see, not all the trees and not all the houses get their rigid body.

walaber

24-09-2007 01:18:41

turn off optimization, it is known to be a bit buggy in the latest version of Newton.

are you sure the collision is not there? or is it just not drawing it?

ervilha

24-09-2007 05:52:03

Yes there were no collision there.

I've turned off optimization and that solved the problem!

Thanks Walaber :)