gkjohnson / three-mesh-bvh

A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes.
https://gkjohnson.github.io/three-mesh-bvh/example/bundle/raycast.html
MIT License
2.5k stars 260 forks source link

Shader Functions: Add option for filtering by triangle side #467

Open gkjohnson opened 2 years ago

gkjohnson commented 2 years ago

Related to #463

peterreeves commented 1 year ago

Hey, just trying to clarify what this issue is about.

I'm currently having a problem where I have a mesh whose material is set to THREE.FrontSide, but I want to receive both forward facing and backwards facing intersections when I do a raycast.

Does this issue mean I could configure the raycaster to "ignore" the material parameters and just give me all intersections? If so that would be great.

gkjohnson commented 1 year ago

No - this is for shader functions. The cpu raycast functions match the behavior of three.js' built-in functions. If you need both sides of the raycast hits both three.js and this project are flexible enough for you to change material settings or provide custom bvh raycast parameters to get what you're looking for.

peterreeves commented 1 year ago

Ahh, ok. Thanks.