Code: Select all
node1->getTransformedBoundingBox().intersectsWithBox(node2->getTransformedBoundingBox());
Code: Select all
node1->getTransformedBoundingBox().intersectsWithBox(node2->getTransformedBoundingBox());
Code: Select all
scene::ITriangleSelector* selector = 0;
if (q3node)
{
q3node->setPosition(core::vector3df(-1350,-130,-1400));
selector = smgr->createOctreeTriangleSelector(
q3node->getMesh(), 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,-10,0), core::vector3df(0,30,0));
selector->drop(); // As soon as we're done with the selector, drop it.
camera->addAnimator(anim);
anim->drop(); // And likewise, drop the animator when we're done referring to it.
}
Code: Select all
node->updateAbsolutePosition()
Code: Select all
if (selector)
{
scene::ISceneNodeAnimator* animator = smgr->createCollisionResponseAnimator(
selector, node, core::vector3df(80,50,40),
core::vector3df(0,0,0), core::vector3df(0,0,0));
selector->drop(); // Don't drop the selector after the camera-level collision (if you keep that), only drop after this node-level collision
node->addAnimator(animator);
animator->drop();
}