Hello, I am trying to ray cast from selected submeshes.
But I am not getting the unexpected result as follow.
What is the correct way to cast a ray from selected submesh
Hello, I am trying to ray cast from selected submeshes.
But I am not getting the unexpected result as follow.
What is the correct way to cast a ray from selected submesh
Welcome abroad!
Can you detail a bit more what are you doing on this PG? And what is the expected result?
@carolhmj The imported mesh vertices were re-ordered since the multimat was giving very random colors without any structure. After it was run through the Octree we end up with overlapping octree sections (as shown in the figure) with the bounding box of the grey geometry. This contains the submesh which has penetration/ proximity with the adjoining mesh.
The goal is to select the vertices that are a part of the intersecting submesh and then raycast from those selected vertices. So the submesh by itself gives us the required selection however, when selecting the vertices from this submesh and raycasting from that selection the rays don’t fall on the vertices but are random as seen in the screen shot. So,
Thank you.
It’s a bit of a complex scenario so I will need some time to go over it.
@carolhmj We couldn’t figure what was causing the above issue however, the de-construct mesh snippet solved the problem for us. Just leaving it out here for others who might want to take this approach. After re-ordering the vertices on the imported stl file, the snippet gave us submeshs which we could use to raycast and did not cause an issue. It works quite fast too. Pasting the link for the snippet for easy reference.
Glad you found a solution and thanks for leaving it here for the community! Sorry I couldn’t go over it in the proper time