JohnBoyManbullet
29-07-2011 04:19:59
Hello all, I have been toiling with rayhits and ray testing, it has driven me nuts for a week. I have figured out what the problem is im pretty sure. I have fomulas for calculating the distance from a ray hit. I have been using this to calculate the hit point and for other purposes. My problem was after the first hit the raycallback.hasHit() will remember that it hit something , and from there onward even if it isnt hitting somthing, it still is set to has hit. This means my calculations remeber the first hit, and will not re calculate because the ray hit didn't refresh it self. This is frusterating, i do not understand. I know that the contactManifold does this to solve a similar situation.
Is there something like this , but for ray tests. I need to refresh them, or just delete the last ray hit. ? any words thanks.
contactManifold->refreshContactPoints(obA->getWorldTransform(), obB->getWorldTransform());
Is there something like this , but for ray tests. I need to refresh them, or just delete the last ray hit. ? any words thanks.