# Body to ignore param not working on raycast queries

**URL:** https://forum.babylonjs.com/t/body-to-ignore-param-not-working-on-raycast-queries/50916
**Category:** Bugs
**Created:** [May 29, 2024, 9:11am UTC](https://forum.babylonjs.com/t/body-to-ignore-param-not-working-on-raycast-queries/50916 "2024-05-29T09:11:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cijaaimee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cijaaimee/32/40020_2.png) [@cijaaimee](https://forum.babylonjs.com/u/cijaaimee)
#### Post date: [May 29, 2024, 9:11am UTC](https://forum.babylonjs.com/t/body-to-ignore-param-not-working-on-raycast-queries/50916/1 "2024-05-29T09:11:42Z")

</div>

Hello,

I’ve been using Havok without the BabylonJS integration and noticed that the “optional body to ignore” parameter in the raycast query is, ironically, ignored. I initially suspected it was an issue with my code but I no longer think so.

I’ve made a simple demo to show the issue: [https://playground.babylonjs.com/#PY59V9#21](https://playground.babylonjs.com/#PY59V9#21). In the demo, two boxes are created and a ray is casted through them. The `HP_World_CastRayWithCollector` call is meant to ignore box nº1, yet `HP_QueryCollector_GetCastRayResult` consistently returns that as the hit point.

Best regards,  
James

PS: I’ve also opened an issue on [GitHub](https://github.com/BabylonJS/havok/issues/21) regarding this topic. Hopefully someone can help me figure this out!

---

<div class="post-metadata">

### Author: ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)
#### Post date: [May 29, 2024, 9:29am UTC](https://forum.babylonjs.com/t/body-to-ignore-param-not-working-on-raycast-queries/50916/2 "2024-05-29T09:29:08Z")

</div>

Cc @Cedric

---

<div class="post-metadata">

### Author: ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)
#### Post date: [May 29, 2024, 9:37am UTC](https://forum.babylonjs.com/t/body-to-ignore-param-not-working-on-raycast-queries/50916/3 "2024-05-29T09:37:54Z")

</div>

Hi @cijaaimee welcome to the community

I think this is an issue for @eoin  
I’ve checked as well and everything seems correct in your code.

---

<div class="post-metadata">

### Author: ![eoin](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@eoin](https://forum.babylonjs.com/u/eoin)
#### Post date: [May 29, 2024, 9:59am UTC](https://forum.babylonjs.com/t/body-to-ignore-param-not-working-on-raycast-queries/50916/4 "2024-05-29T09:59:24Z")

</div>

Thanks for that. Definitely a bug; will get it fixed in the next update.

---

<div class="post-metadata">

### Author: ![cijaaimee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cijaaimee/32/40020_2.png) [@cijaaimee](https://forum.babylonjs.com/u/cijaaimee)
#### Post date: [May 29, 2024, 10:06am UTC](https://forum.babylonjs.com/t/body-to-ignore-param-not-working-on-raycast-queries/50916/5 "2024-05-29T10:06:42Z")

</div>

Wow, thanks for looking into this so quickly! This seems to be a great community 😄

Hopefully the next update can be released soon. I’m really excited about moving from Ammo to Havok. Have a great day folks!
