ebol
05-10-2007 12:15:09
Hi, I hope maybe someone can help me with this. When raycasting against bodies 1, 2, 3 (ray goes through them in that order), the result is inverted - getClosestActor() returns body num. 3, and RayCastReport container has 3, 2, 1 order.
Maybe I'm doing something wrong here, here's my code.
What could be the reason of this?
Maybe I'm doing something wrong here, here's my code.
Ogre::Ray ray=mPlayer->mCamera->getCameraToViewportRay(0.5,0.5);
NxOgre::RayCaster* rayCast= new NxOgre::RayCaster(ray.getOrigin(), ray.getDirection().normalisedCopy(), 50, NxOgre::RayCaster::RCT_ALL, mPlayer->getGameWorld()->getPhysXScene());
bool b=rayCast->castShape(NxOgre::RayCaster::AF_NONE);
What could be the reason of this?