I’ve bulit a mesh using MeshBuilder:ExtrudeShapeCustom. I’ve create a shape using 4 points and a path.
It doesn’t matter the shape i use, everytime the final mesh can only show 2 of the four faces it has.
¿Is there a way to be able to see the 4 of them?
I don’t know how to upload my playground so i copy it below
var createScene = function () {
// This creates a basic Babylon Scene object (non-mesh)
var scene = new BABYLON.Scene(engine);
const camera = new BABYLON.ArcRotateCamera(“camera”,45, 0,12, new BABYLON.Vector3(0,1,0), this.scene);
// // This creates and positions a free camera (non-mesh)
// var camera = new BABYLON.FreeCamera(“camera1”, new BABYLON.Vector3(0, 5, -10), scene);
// // This targets the camera to scene origin
// camera.setTarget(BABYLON.Vector3.Zero());
// This attaches the camera to the canvas
camera.attachControl(canvas, true);
camera.rotation = new BABYLON.Vector3(Math.PI/4,0,0)
// This creates a light, aiming 0,1,0 - to the sky (non-mesh)
var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
// Default intensity is 1. Let's dim the light a small amount
light.intensity = 0.7;
const perfil = [
new BABYLON.Vector3 (0,-0.5,0),
new BABYLON.Vector3 (0.125,0,0),
new BABYLON.Vector3 (0,0.5,0),
new BABYLON.Vector3 (-0.125,0,0)
]
const path = [
new BABYLON.Vector3 (0,0,0),
new BABYLON.Vector3 (0,1,0),
new BABYLON.Vector3 (0,2,0),
new BABYLON.Vector3 (0,3,0),
new BABYLON.Vector3 (0,4,0),
new BABYLON.Vector3 (0,5,0),
new BABYLON.Vector3 (0,6,0),
new BABYLON.Vector3 (0,7,0),
]
const pala = BABYLON.MeshBuilder.ExtrudeShapeCustom ("pala",{shape: perfil, closeShape: true,path: path})
// Our built-in 'ground' shape.
var ground = BABYLON.MeshBuilder.CreateGround("ground", {width: 6, height: 6}, scene);
return scene;
};