After perfecting (I thought) my script that decomposes an imported model into it’s meshInstances and creates new entities with those meshes – I have imported a model and tried the code on it. Really everything works as expected, except the mesh colliders. I’m almost sure it has something to do with scale. Run the project, open the console and click on different countries. The raycast routines runs on each click, but never returns a result.
In the code, I set the model’s scale to [ 0.01, 0.01, 0.01, ]. Otherwise the model is unnecessarily huge. Interestingly, if you don’t do this, the model does not assemble itself correctly, not at all. Try commenting that line out. To make the model work at that scale, multiply the position vector by 100 a few lines down from there. You will be inside the globe when it finishes loading and initializing. But the meshes still don’t respond to raycasting.
The model is a globe with individual meshes for each country. Each country has two meshes, a country shape and then a beveled cap. You will see that I’m using a collisionMode variable to control which meshes get the colliders (only the cap or only the shape or both). No configuration that I’ve tried has worked.