# Passing through object when clicking

**URL:** https://discourse.processing.org/t/passing-through-object-when-clicking/24338
**Category:** Libraries
**Created:** [October 4, 2020, 6:24pm UTC](https://discourse.processing.org/t/passing-through-object-when-clicking/24338 "2020-10-04T18:24:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hugoromo](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@hugoromo](https://discourse.processing.org/u/hugoromo)
#### Post date: [October 4, 2020, 6:24pm UTC](https://discourse.processing.org/t/passing-through-object-when-clicking/24338/1 "2020-10-04T18:24:29Z")

</div>

Hello,  
So I was wondering if there is any way of making a click pass through from an object at front to an object behind, I’m using the the Picking library in a 3D canvas  
I have a cube made of boxes, and would like to show the stroke of boxes around the center box, but the click to be made to the box in the center.  
Thanks in advance!

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [October 4, 2020, 7:19pm UTC](https://discourse.processing.org/t/passing-through-object-when-clicking/24338/2 "2020-10-04T19:19:28Z")

</div>

In my opinion see [screenX screenY equivalent in p5.js](https://discourse.processing.org/t/screenx-screeny-equivalent-in-p5-js/10581/5)

so it’s another way of picking: each cube stores it’s 2D screen pos.

When the mouse is clicked, check mouseX,mouseY against the 2D screen pos using dist() command
