Manual Object

kalda

05-01-2008 18:13:06

Hello!

Is possible test collision with manualobject (game map in my own format) based on this mesh not on bounding box,sphere,etc...

Thanks

rewb0rn

06-01-2008 14:39:51

Yes, that would be a StaticTriangleMesh Geometry:


OgreOde::EntityInformer* EntityInformer = new OgreOde::EntityInformer(Entity, Node->_getFullTransform());
Geometry = EntityInformer->createStaticTriangleMesh(World, Space);

Fred

06-01-2008 15:50:33

But afaik, if you use a Body, you have to write:

OgreOde::EntityInformer* EntityInformer = new OgreOde::EntityInformer(Entity);

kalda

06-01-2008 16:11:59

But ManualObject cannot be converted to Entity or not?

rewb0rn

06-01-2008 16:31:06

hm i dont know i thought you would have your map in an entity class

kalda

08-01-2008 14:27:04

Hey. Sorry. There's way how to convert ManualObject into Entity


MeshPtr mesh = ManualObject->convertToMesh("LevelMesh");
Entity* ent = sceneManager->createEntity("LevelEntity",mesh->getName());