Okay, with your help, I am moving forward:
- I understood thanks to one of your post, Mawa, that the order the cameras are added to the
scene.activeCameras
, matters, actually, crossing with what Evgeni_Popov wrote, I think the last camera added becomes thescene.cameraToUseForPointers
- I understood thanks to deltakosh’s answer in this post that I can use
AdvancedDynamicTexture.scaleTo
to adjust the 2d controls: I ajdust it to the canvas size times the viewport size (which is in percent):this.advancedTexture.scaleTo(this.canvas.width*this.camera.viewport.width, this.canvas.height);
and the result is good, no more distortion.
Almost there
But now I would like:
- to have the pointers on the cards working on the left camera
- to have the menu buttons icons (settings, fullscreen, close): only displayed on the right camera and enabled…
Is this possible ? if only one camera at a time can use pointers, then I would remove them from the right camera and le them on the left one.
Finally, with the layerMasks: how can I keep all the meshes on both camera except these menu buttons ?
If no solution, I might go with an html div overlay, like the chat on the low left corner…