Hello everyone,
i try collide the camera and imported mesh, but i can’t.
i make a test with a camera and the primitive mesh (cube and sphere) and works fine.
when i import the mesh in the function in every mesh active the checkcollisions, but don’t works.
the code is bellow
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 100, new BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, false);
camera.checkCollisions = true;
// CARGA MODELO
BABYLON.SceneLoader.ImportMesh("", "", "scene.glb", scene, function (meshes) {
camera.target = meshes[0];
for(const mesh in meshes)
{
mesh.checkCollisions = true;
}
thanks for your help