Resizing Babylon Engine

I am trying to resize Babylon to the mobile view. I successfully scaled Babylon engine, but when I do that the GUI interactions don’t resize when the images (visible GUI) have properly scaled.
Here’s what I have done :

<div class="game" ![babylon|334x500](upload://6hqyN46WCUvA9H2eLuNYO3v0rvr.jpeg) >
     <canvas id="renderingGame">

// After the engine has loaded

I’m also trying setting

advancedTexture.idealHeight = 1720
advancedTexture.idealWidth = 980

Problem :slight_smile: :
From the above image, (1) is a ImageBasedGUIButton & is correctly scaled to the the iphone resolution. But when i try clicking the (1) it doesn’t work, rather clicking in the position of (2) it works. It seems everything resized except the interactions on canvas.

1 Like

Could you kindly reproduce your problem in Playground?

Playground , i doubt that. Maybe i can produce in Codepen , hold on.

Welcome to the forum wulcat, here is what labris means by playground:
Just in case. You probably knew that.
Not sure if it solves GUI, but here is what I use for resize to mobile:

window.addEventListener('resize', function(){ nx.engine.resize(); });

I have the same problem.