Oddness with AABB IntersectsMesh

Hi guys.

https://playground.babylonjs.com/#KQV9SA#71

The AABB bounding box is the left one, and the point-of-interest.

Lines 117 - 143 renderloop… I’m checking all mesh in scene (except self and inActives)… for precise intersectsMesh against mesh named imported (the blue orbiting box).

Notice that when blue box intersects with OBB bbox on right side of scene, blue box spins… seemingly normal. (spinning is my visual indicator that an intersect is happening)

When blue box intersects AABB bbox on LEFT side… blue box spins at two different speeds. It spins slower when intersecting ONLY the boundingBox… but spins faster when it intersects the ACTUAL mesh.

Can anyone explain why? (thx) Perhaps… dual intersecting is happening on right-side OBB by nature, and on left-side AABB, single intersecting happens in bounding area, but switches to dual intersecting when intersecting the actual plane mesh? Hmm.

Changing line 129 precision to false… changes symptom. Not sure if pertinent/apropos.

Just a curiosity. I have no pressing project deadline or particular use-case. Truth is… it is mostly my dog who is seeking the explanation and bug-check. :slight_smile:

Hi Wingnut,

It spins at two different speeds as well for the OBB, but because the bounding box is so thin, it’s not noticeable. Note that the bounding box and the actual mesh are two separate meshes. Here I made the OBB mesh thicker:

https://playground.babylonjs.com/#KQV9SA#72

2 Likes

Oh man… DUH, Wingy. The boundingBoxes are actual mesh… created right there in front of me.

Geez, am I dumb, sometimes! Those planes aren’t .showBoundingBox = true. Phew.

Thanks G! Well done. My head was obviously well-wedged into my butt, and your lawn tractor yanked it out… nicely. (Wingy thwocks himself, and checks the strength levels on his recreational drugs.)

1 Like
recreationalDrugs.normalize();

:smile:

1 Like