Collide with a gltf scene

Hi,
I have problems to make a collide test using a blender exported gltf model.

in blender the mesh is as follow
image

I am using getNodeByName() to retrieve my mesh, but unfortunately, when doing
axe6 = getNodeByName(“axe6_te32”) I am retriveing a TransformNode.
Then, I am not able to use axe6.intersectsMeshs() function.

I found I can get the meshes using axe6.getChildMeshes () that returns me an array of Mesh(es).In my case there are 17 meshes inside (I think that’s because there are 17 materials defined in it). But from my viewpoint this should be only one mesh to be able to use collide detection ?

What to do in order being able to use this group of mesh as a single on and being able to use collide ?

Regards
Steph

Hey, it returns a TransformNode because the given node has no geometry so no way to detect collision

I understand . But is there a workaround ?
Or do you affirm it is not possible to use collide with blender gltf exported scenes ?

I agree that at the moment, I have not converted this shape to a single convex hull , to simplify the mesh complexity, but I think it will not solve this problem.

Exploring documentation I found exactly what I needed to achieve my task : Physics engine.Using A Physics Engine | Babylon.js Documentation

I added some convex hulls in my scene, named with -collide flag in name.
They are declared as impostors in physics engine.

I used ammo plugin (not really easy to setup)

I will continue in this way…and see

3 Likes