# Check if a point is in front or behind the mesh

**URL:** <https://forum.babylonjs.com/t/check-if-a-point-is-in-front-or-behind-the-mesh/6515>\
**Category:** Questions\
**Tags:** gui\
**Created:** [October 22, 2019, 8:45pm UTC](https://forum.babylonjs.com/t/check-if-a-point-is-in-front-or-behind-the-mesh/6515 "2019-10-22T20:45:39Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 23, 2019, 10:29pm UTC](https://forum.babylonjs.com/t/check-if-a-point-is-in-front-or-behind-the-mesh/6515/13 "2019-10-23T22:29:12Z")

</div>

The 2nd solution is not practical:

[https://playground.babylonjs.com/#CUH660#2](https://playground.babylonjs.com/#CUH660#2)

I did not finish the implementation because calling `readPixels` on the `RenderTargetTexture` each frame is a performance killer. So you should really use the shader solution.

---

_[View the full topic](https://forum.babylonjs.com/t/check-if-a-point-is-in-front-or-behind-the-mesh/6515)._
