Search the Community
Showing results for tags 'why'.
-
Why ? var rawVerts = object.getVerticesData ? object.getVerticesData(BABYLON.VertexBuffer.PositionKind) : []; var rawFaces = object.getIndices ? object.getIndices() : []; BABYLON.Tools.Warn("MeshImpostor only collides against spheres."); returnValue = new CANNON.Trimesh(rawVerts, rawFaces); Even tho CannonJS supports mesh/plane collision ? : Demo : https://schteppe.github.io/cannon.js/demos/bunny.html Source : https://github.com/schteppe/cannon.js/blob/master/demos/bunny.html // ground plane var groundShape = new CANNON.Plane(); var groundBody = new CANNON.Body({ mass: 0, position: new CANNON.Vec3(0,0,-5) }); groundBody.addShape(groundShape); world.addBody(groundBody); demo.addVisual(groundBody); Edit: Ok, I overlooked the fact that the Mesh impostor is infact a Trimesh shape (https://schteppe.github.io/cannon.js/demos/trimesh.html). So can you add ConvexPolyhedron shapes in the next release please ?