jdurrant Posted March 5, 2015 Share Posted March 5, 2015 I create a groundmesh using these commands:var groundMaterial = new BABYLON.StandardMaterial("ground", scene);groundMaterial.backFaceCulling = false;groundMaterial.diffuseTexture = new BABYLON.Texture("assets/ground/ground.png", scene);groundMaterial.specularColor = new BABYLON.Color3(0, 0, 0);var highres_ground = BABYLON.Mesh.CreateGroundFromHeightMap("highres_ground", "assets/ground/ground.png", 500, 500, 50, -100, 0, scene, false);highres_ground.material = groundMaterial;highres_ground.checkCollisions = true;I'd like to excise just part of this groundmesh using CSG. So I run this command:highresCSG = BABYLON.CSG.FromMesh(highres_ground);But I get this error: TypeError: subMeshes is undefined When I replace highres_ground with a simple cube, I don't get the error:var highres_ground = BABYLON.Mesh.CreateBox("box", 20, scene);Any suggestions on how I can convert groundmesh into a standard mesh that can be manipulated with CSG? Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.