Hello! So I’ve been trying to get the vertex from the intersections between a group of lines and a mesh, my project is hold by a lot of npm libraries so it’s gonna be hard to show a playground of it but let me explain.
There are lines in the ground that makes the shape of a shadow and there is the yellow base on the ground, I need on the shape to get the specific dots that intersect those lines.
Is there’s a function that can help me to achieve what I need? I just need to get the dots that intersects between the base and the shadow lines. Does a collision detection gonna help me achieve this? Remember that the shadows are lines, not meshes.
Edit: I made it to apply a collision detection (intersectsMesh function), the thing that I can’t find out yet is to detect the intersecting vertex, that function helps to do that?
Ok, after implementing ray on my project it detects if there is an intersection or not, but what I can’t find is the next step, is there any function where I can get the coordinates of the intersection point?, I modified the base a bit and I added invisible lines to the coordinates of the base so I can grab that edge easier.
Thanks for the answer! I solved my problem using turf.js to get coordinates and then applying intersect and difference algorithms. I think doing it with the babylonJS way that I was thinking would be a longer route. But thanks for the answer!