Multiple views blocking key events

Hello everyone,

I’m really struggling with getting a minimap to work. I have a main camera I want to be able to control with the WASD keys.

The view of a second orthographic camera should be displayed in a second canvas. Whenever I add multiple views the key events aren’t registered anymore. Also click events on a fullscreen GUI dont work.
Am I missing something or is it simply not possible with my current setup?

I have set up a playground to show roughly what Im trying to achieve:
https://www.babylonjs-playground.com/#G1XIAR

Really appreciate any help!

Hi,

Maybe you can take a look at the viewport feature instead of using two canvas :
https://doc.babylonjs.com/how_to/how_to_use_multi-views

I found this example very useful :
https://www.babylonjs-playground.com/#6PA720#147

Hi, I already tried that and it definitely works a lot better. But in my case I would prefer it on another canvas to more freely place/move the second view. Maybe I’ll just go with the viewports for now.

Hi,
I don’t know why your code isn’t working, but I tried to register a custom input handler on your mainCam and it works :
https://www.babylonjs-playground.com/#G1XIAR#1
(I reused the code from this PG example)
Pending advice from a BabylonJs expert, this may be an acceptable workaround.

1 Like