Code: Select all
scene::ITriangleSelector* selector = 0;
if (q3node)
{
q3node->setPosition(core::vector3df(-1350,-130,-1400));
selector = smgr->createOctTreeTriangleSelector(q3levelmesh->getMesh(0), q3node, 128);
q3node->setTriangleSelector(selector);
}
Code: Select all
if (selector)
{
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(30,50,30),
core::vector3df(0,-1,0),
core::vector3df(0,50,0));
Code: Select all
selector->drop();
camera->addAnimator(anim);
anim->drop();
}
Code: Select all
if (smgr->getSceneCollisionManager()->getCollisionPoint(
line, selector, intersection, tri))
{