I believe an update between October 2019 and now has broken Raycasting on any GLB/GLTF objects that have SkinnedMesh objects in them

So yeah, this one is a seriously weird one. I’ve laid it all out in a Sandbox here and I’d love to get some input on what could be happening here.

I wrote a tutorial back in October, the part that others are failing on now is that Raycasting will no longer find an object as long as it has Bones and/or a SkinnedMesh object. I thought this would be an easy debug can I don’t know where in the pipeline it’s breaking down. Whether it’s Blenders GLB export, or Three, however different versions of Three don’t appear to make a difference as far as I can tell.

In the Sandbox there are 3 GLB files. There’s a low poly character that has bones and one that doesn’t You will see in the console when you click on the character that the one with the bones doesn’t respond to the raycasting.

However, the third file is a GLB that I output in October, which correctly responds to the raycasting.

What confuses me is that putting the two Scenes objects side by side, the makeup seems identical:

I’d love to help this guy out and at this point I’m stumped. Any ideas?

Maybe related:

Notice that raycasting with SkinnedMesh is still problematic since the engine is still unable to compute a proper AABB enclosing the maximum extend of the animated geometry. That means raycasting might still fail unless you manually define the AABB large enough.

To clarify: Before the above PR was merged, raycasting with SkinnedMesh was in fact not supported.

1 Like