Tiling quads so there are no gaps

I have discovered that if I tile quads together so that technically there is no gap (e.g. quads of size 1 x 1, spaced 1 unit apart) it is still possible for a Ray to pass through without colliding with them if the ray is at an angle when passing between the joins. 

Has anyone else discovered this, and is there a cleaner solution than just increasing the size of the quads by a fraction?

(I know this is an old post, but…)

I would imagine that:

  1. You might build the geometry as a single volume. You could look at classes like Quad and Box to see how to do this. Once you've encapsulated the functionality to construct parts of the mesh, it wouldn't be so bad. But writing that might be a tad annoying. But it would certainly be far harder to work with UVs this way, I'd think.

  2. You could create solid backup planes somehow, for the raycast detection. These would be logical rather than visible/renderable planes.

  3. You could approximate the collision detection shape using, for example, collections of bounding spheres or boxes.

Thanks for the ideas.  I solved the problem by overlapping the quads by a fraction.  Not ideal but it works!

Cool… :slight_smile:

It turns out I realised after writing this yesterday, "How about just increasing the size of the Bounding box using setModelBounds()… all that is already part of the engine.