Havoc detects collisions at very wrong positions

The below is a playground that reproduces a bug.
There is a ground and 4 borders around it. At the time of the scene start border_1 is on your left, border_2 is in front of you, border_3 is on your right and the border_4 is behind you. Border locations are important here for debugging purposes.
The scene includes a simple box (crate) with collision output into console.log().
Also I set WASD controls for camera and added the ability to push physical objects by running into them. It allows to easily trigger the bug many times.

Link: https://playground.babylonjs.com/#73HG5P

The problem is that I can’t push the crate to the right, it immediately “collides” with border_2, despite that border_2 is located in front of you (not at the right) and it is really far away. Also I can push the box outside of border_2 or border_4 if I move the box to the places where those borders visually appear. Box just fly through. However collisions with border_1 happens properly.

Maybe it’s related with the fact that I am cloning the borders instead of creating them from scratch. But even if it’s the reason I still consider it as a severe bug, because it’s very unobvious that such problem may arise.

@Cedric @RaananW @carolhmj Any thoughts?

I tried to repro but I’m not sure I get the expected result. It looks like I can push the cube anywhere.
Can you please rework the PG so the issue is more obvious? Something like a targeted camera and an impulse on the cube. It would make our life much more easier :slight_smile:


I can’t reproduce it in PG anymore as well. However, it still happens in my local environment.
On Sunday (when this post was created) I could reproduce it in PG. Did you flush any code to PG since last Sunday (April 30th, 2023)? Or maybe PG is running the last available BabylonJS build (AKA continuous integration build)? If so, the problem might be fixed automatically with the next release.

Yep, I downloaded the babylon.js file that PG refers to: https://preview.babylonjs.com/babylon.js?t=1682926053948 and tried to use it in my project. And the problem is gone. So, someone did something.

1 Like