Hi, you have method fait make rect arround mini camera viewport ?
line 388
click in corner right
Hi, you have method fait make rect arround mini camera viewport ?
line 388
click in corner right
You can get there with a bit of math GUI Viewport Outline | Babylon.js Playground (babylonjs.com)
LoL. Whenever I read ‘Maths’ it makes me nervous
You should have said “you can get there with just very little effort to make it responsive and match your needs”. And then, not as if you didn’t already do most of the job, so it’s now as close as can be to a copy/paste
Thanks for your help, SOLVED thanks to you to all of you :DDD
var rect3 = new BABYLON.GUI.Rectangle();
rect3.color = "red";
rect3.thickness = 4;
rect3.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
rect3.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_BOTTOM;
rect3.width = minicamera.viewport.width;
rect3.height = minicamera.viewport.height;
rect3.left = minicamera.viewport.x * 100 + "%";
rect3.top = minicamera.viewport.y * 100 + "%";
console.log("viewport : " + "width = " + minicamera.viewport.width + "; height = " + minicamera.viewport.height + "; x = " + minicamera.viewport.x + "; y = " + minicamera.viewport.y);
advancedTexture.addControl(rect3);