# Raycast doesnt work on

**URL:** <https://forum.babylonjs.com/t/raycast-doesnt-work-on/23066>\
**Category:** Bugs\
**Created:** [August 13, 2021, 8:22pm UTC](https://forum.babylonjs.com/t/raycast-doesnt-work-on/23066 "2021-08-13T20:22:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CornelioD](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/corneliod/32/15799_2.png) [@CornelioD](https://forum.babylonjs.com/u/CornelioD)\
**Post date:** [August 13, 2021, 8:22pm UTC](https://forum.babylonjs.com/t/raycast-doesnt-work-on/23066/1 "2021-08-13T20:22:24Z")

</div>

Hi, maybe I found a bug.  
The hitray seems to not be working when called just after being moved.  
PG: [https://www.babylonjs-playground.com/#TE2VBZ#1](https://www.babylonjs-playground.com/#TE2VBZ#1)

---

<div class="post-metadata">

**Author:** ![nekochanoide](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nekochanoide/32/12431_2.png) [@nekochanoide](https://forum.babylonjs.com/u/nekochanoide)\
**Post date:** [August 14, 2021, 8:28am UTC](https://forum.babylonjs.com/t/raycast-doesnt-work-on/23066/2 "2021-08-14T08:28:28Z")

</div>

Hello,  
Use `hitme.computeWorldMatrix(true);` right before ray picking.  
[https://www.babylonjs-playground.com/#TE2VBZ#3](https://www.babylonjs-playground.com/#TE2VBZ#3)  
What happens is that mesh do not update its position right after it has been set.  
It updates it right before render call.  
Matrix of mesh is ‘dirty’. This helps to update only ‘dirty’ meshes that have been moved.  
So there is more space for your processor if there are a lot of meshes are not moving in your scene.  
I believe that if all of your meshes are move all the time it is possible to disable ‘dirty’ mechanism

---

<div class="post-metadata">

**Author:** ![CornelioD](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/corneliod/32/15799_2.png) [@CornelioD](https://forum.babylonjs.com/u/CornelioD)\
**Post date:** [August 16, 2021, 7:09pm UTC](https://forum.babylonjs.com/t/raycast-doesnt-work-on/23066/3 "2021-08-16T19:09:56Z")

</div>

Yes, that’s it! Thanks 🧐
