When I rotate a div, and use the canvas (in the div) to create engine, then I create one GUI button, the button can not be click.
CSS:
#renderCanvas {
transform: rotate(90deg);
}
html:
<canvas #renderCanvas id="renderCanvas"></canvas>
ts:
this.btn_Box = Button.CreateSimpleButton(“openBox”, “open”);
UIManager.instance.uiRoot.addControl(this.btn_Box)
this.btn_Box.width = “100px”
this.btn_Box.height = “40px”
this.btn_Box.background = “green”
this.btn_Box.color = “yellow”
this.btn_Box.linkWithMesh(box)
this.btn_Box.linkOffsetY = “-450px”
this.btn_Box.onPointerClickObservable.add(() => {
instance.openBox();
})