PhysicsRaycastResult.reset() does not reset .body property

Hi everyone,

Just an FYI, see here:

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?)


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.

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