Topic: count the collisions number of an entity (c++)
Hi, i try to count the number of meshs which are in collision with an ghost entity, but maratis crash ... this is the code I use :
MEngine * engine = MEngine::getInstance();
MyGame * game = (MyGame*) engine->getGame();
MLevel* lvl = engine->getLevel();
MScene* scene = lvl->getCurrentScene();unsigned int Id;
int nbColl;
MOEntity* ent= scene->getEntityByName("myEntity");
scene->getObjectIndex(ent->getName(), &Id);
MPhysicsContext * physCont = engine->getPhysicsContext();nbColl = physCont->isObjectInCollision (Id);
// here maratis crash
Last edited by Alinor (2011-12-03 19:41:59)