Raycast touching object? Passing through walls...

varoudis
Posts: 5
Joined: Sat Jan 22, 2011 11:24 am

Raycast touching object? Passing through walls...

Post by varoudis »

Hi,
I use raycasting in order to 'floodfill' a space with objects.

I do a simple raytest from A to B:
btVector3 rayStart( XXX );
btVector3 rayEnd( XXX );

btCollisionWorld::ClosestRayResultCallback rayCallback( rayStart, rayEnd );
rayCallback.m_collisionFilterMask = a_filterMask; // short int a_filterMask=btBroadphaseProxy::AllFilter
world->rayTest( rayStart, rayEnd, rayCallback );

In most cases it works ok BUT... when B is just touching an object its not a hit. So if you continue to 'floodfill' from B to C lets say, you actually passed through the wall.

Any ideas or pointers?

Thanks