Hello ThreeJS Community! I have a problem I’m hoping someone can help me with. I am trying to traverse a loaded .gltf and use the ConvexHull’s setFromObject function to create a hull from that object, then pass the hull to a modified ConvexGeometry constructor (modified to accept a hull instead of a set of points, since I noticed that ConvexGeometry relies on ConvexHull anyway).
My ultimate goal with this is to create a convex geometry that maps exactly to given mesh, then make the geometry invisible and use it to create a physics mesh. Here is my code to create the ConvexGeometry:
However, the created geometries do not conform to the geometry of the mesh. Here is an image of this logic applied to only one of the .gltlf’s child meshes:
Does anyone have an idea why this might be happening? Let me know if you need any more information about the code or what I’m doing. Just in case, here is the modified ConvexGeometry constructor I am using:
Thanks in advance for your time and assistance!