# PhysicsRaycastResult.reset() does not reset .body property

**URL:** https://forum.babylonjs.com/t/physicsraycastresult-reset-does-not-reset-body-property/42135
**Category:** Bugs
**Created:** [July 4, 2023, 10:28am UTC](https://forum.babylonjs.com/t/physicsraycastresult-reset-does-not-reset-body-property/42135 "2023-07-04T10:28:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Joe\_Kerr](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/joe_kerr/32/39017_2.png) [@Joe\_Kerr](https://forum.babylonjs.com/u/Joe_Kerr)
#### Post date: [July 4, 2023, 10:28am UTC](https://forum.babylonjs.com/t/physicsraycastresult-reset-does-not-reset-body-property/42135/1 "2023-07-04T10:28:23Z")

</div>

Hi everyone,

Just an FYI, see here: [https://playground.babylonjs.com/#E5URLZ#4](https://playground.babylonjs.com/#E5URLZ#4)

Logs “target1” 3 times; whereas it should only be logged once.

Fix by undefining body yourself. Come to think of it: checking for PhysicsRaycastResult.isHit should also work (shouldnt it?)

Regards  
Joe

---

<div class="post-metadata">

### Author: ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)
#### Post date: [July 4, 2023, 12:39pm UTC](https://forum.babylonjs.com/t/physicsraycastresult-reset-does-not-reset-body-property/42135/2 "2023-07-04T12:39:08Z")

</div>

Hey, thanks for the report, I’ll fix that!

Yup, you can test for `hasHit` (I assume you’re talking about this), this one is being reset properly.

---

<div class="post-metadata">

### Author: ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)
#### Post date: [July 4, 2023, 1:05pm UTC](https://forum.babylonjs.com/t/physicsraycastresult-reset-does-not-reset-body-property/42135/3 "2023-07-04T13:05:09Z")

</div>

PR: [[Physics] Reset body and body index on PhysicsRaycastResult by carolhmj · Pull Request #14022 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/14022)
