Selective raycasting

jchmack

01-05-2007 12:34:02

Is there a way i can say raycast only on this object? or raycast on all but this/these objects?

Ogre::Ray r = CurrentCamera->getCameraToViewportRay(
float(x / mWindow->getWidth()),
float(y / mWindow->getHeight())
);

mRayCaster->setOrigin(r.getOrigin());
mRayCaster->setDirection(r.getDirection());
mRayCaster->setDepth(1000);

//i want to write or find this function
mRaycaster->DONTHITTHIS(somebody/someGroup);
//Or
mRaycaster->HitOnlyTHIS(somebody/someGroup);