# Raycaster interceptor returning hits for invisible faces

**URL:** <https://discourse.threejs.org/t/raycaster-interceptor-returning-hits-for-invisible-faces/18057>\
**Category:** Questions\
**Tags:** raycaster\
**Created:** [August 21, 2020, 4:32pm UTC](https://discourse.threejs.org/t/raycaster-interceptor-returning-hits-for-invisible-faces/18057 "2020-08-21T16:32:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemsincode](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@systemsincode](https://discourse.threejs.org/u/systemsincode)\
**Post date:** [August 21, 2020, 4:32pm UTC](https://discourse.threejs.org/t/raycaster-interceptor-returning-hits-for-invisible-faces/18057/1 "2020-08-21T16:32:17Z")

</div>

Hi  
I have an Mesh (with cone and or cylinder geometry) object that has 2 materials used for different faces where one has visible:false set.

My raycaster intersector is still selecting the invisibe/transparaent faces that have the visible set to false (of course the objects visible property is still true).

Shouldn’t the raycater respect the visible-ness of the material of the face?

---

<div class="post-metadata">

**Author:** ![seanwasere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/seanwasere/32/20864_2.png) [@seanwasere](https://discourse.threejs.org/u/seanwasere)\
**Post date:** [August 21, 2020, 5:49pm UTC](https://discourse.threejs.org/t/raycaster-interceptor-returning-hits-for-invisible-faces/18057/2 "2020-08-21T17:49:01Z")

</div>

Being able to raycast to invisible objects and faces is actually really useful. Think hotspots for example. You could encapture a whole group of other objects using 1 larger invisible object.

See this example  
Hover over, and nearby the animated model.  
[https://sbcode.net/threejs/reflector/](https://sbcode.net/threejs/reflector/)

With the array returned by the THREE.raycaster intersectObjects method,  
see [https://threejs.org/docs/#api/en/core/Raycaster.intersectObjects](https://threejs.org/docs/#api/en/core/Raycaster.intersectObjects)  
you can check whether the object or face detected is actually visible or not, and whether you want to act on it.

---

<div class="post-metadata">

**Author:** ![systemsincode](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@systemsincode](https://discourse.threejs.org/u/systemsincode)\
**Post date:** [August 21, 2020, 7:07pm UTC](https://discourse.threejs.org/t/raycaster-interceptor-returning-hits-for-invisible-faces/18057/3 "2020-08-21T19:07:16Z")

</div>

> [@seanwasere](#):
>
> nd whether you want to act on it.

Yeah I was expecting the default behaviour would be what I expected but I didn’t think about the cases where invisible things need to be considered. OK will add visibility tests to my click handler.
