Notifications
Clear all

[Closed] is rayIntersect able to detect a vertex?

I’m wondering if anyone knows if using rayIntersectScene will detect a collision with an object whose only point of collision is a vertex (that is connected to edges and a polygon). For instance, let’s say you’ve got 2 planes that are identical (with only 1 polygon, no subdivisions). One plane hovers 10 units over the other, so the only difference is in the Z position. X and Y are the same. Then, cast a ray from one of the vertices of the top plane straight down through the bottom plane. So, in theory, the only point in the bottom plane that the ray would intersect would be at that corner vertex.

This is a slightly simplified version of what I am working on, but I figure it illustrates well what I am trying to accomplish. Only in my current script, I am dealing with multiple planes that are on angles, and not every corner is 90 degrees.

What I am noticing is that SOME objects are being detected, but not all. Despite the fact that these vertices are co-linear (x and y are the same, only Z is different). And all face normals are visible to the oncoming ray).

Should this work ok? Or do I need to try casting several rays, like samples, within a small threshold?

Thanks!!