Raycast to a mesh problem.

fassihi

05-08-2009 15:14:00

I have created a cylinder ORGE mesh and converted it to a physics object. When I cast rays to this object from outside the cylinder, I get the hit results and everything is fine, however if I cast a ray from inside this cylinder to find the contact point with the inner surface of it, no results will be given to me. I guess the broadphase collision detection somehow eliminates the ray check.

Is there something that can be done for this case?

betajaen

05-08-2009 15:20:27

Weird, I have raycasted inside objects before and it does hit them, but they've always been spheres or cubes. For meshes, the only thing I can think of is, that the faces are facing in the opposite direction to the ray - which it would pass through them.

I can't see how broadphase alters it, but try it off and see what happens. My only advice would be then is to make your cylinder mesh double sided.

fassihi

06-08-2009 15:01:34

Thanks for the suggestions. I will check the inside surface normals of the cylinder, they might be in the wrong direction.