Hello everyone I am doing a practice with babylon.js with physics and collisions, the issue is that when importing a Blender3D model with the official plugin and babylon I cannot create a “MeshImpostor”.
I mean when importing the mesh collisions and everything works, but the collision shape seems to be a box, I would like to see the collision shapes and know why the collision shape doesn’t work.
Code example scene:
var createScene = function () {
var scene = new BABYLON.Scene(engine);
scene.clearColor = BABYLON.Color3.Blue();
CrearCamaraRotadora();
CrearIluminacion();
// Esto activa la física en la escena y es muy importante para que los objetos se muevan y reaccionen a las colisiones
scene.enablePhysics(new BABYLON.Vector3(0,-9.81 * 6, 1), new BABYLON.OimoJSPlugin());
CrearScenaBlenderBabylonImport(scene);
// Esto es para instanciar objetos a la escena
instanciarCadaCiertoTiempo(100);//recibe como parametro cantidad de objetos
return scene;
}
I still can not see the collision forms, I could detect collisions, according to the official documentation for the MeshImpostor to work in physics, you have to use “cannon.js”.
However I see quite a few irregularities in the collisions,
I notice that a meshImpostor collides with SphereImpostor
but it doesn’t collide with BoxImpostor Link info oficial documentation MeshImpostor
Code example:
scene.enablePhysics(
new BABYLON.Vector3(0,-9.81 * 6, 1),
new BABYLON.CannonJSPlugin());//MeshImpostor no work with OimoJSPlugin