I have a html page with a < canvas> sitting in the background (position: fixed). Over this canvas I have several divs.
Unfortunately I can’t recreate a playground for it but this is what goes in the actual canvas itself: https://www.babylonjs-playground.com/#VHWT1E#10
As you can see from the playground, the map rotates when you move the mouse around the canvas
Back to the HTML, on top of this < canvas> I have a series of divs with links, images and few other bits. Once the mouse goes over some of these divs (containers) I can’t interact with the canvas anymore which means the map doesn’t rotate
Removing the point events was my first call but I have seen it working on other sites so I was wondering how it was done.
Found an example:
I’m aware that this site is using Three JS but the premise is very close to what I’m trying to achieve. Canvas fixed in the background and containers (divs) on top of it. No matter where your mouse is (project names, experience paragraph, etc), the orange circle from the < canvas> element does that panning effect
You need to get the mouse event and then use that event (probably evt.offsetX or offsetY) to change the position of your camera maybe? Depending on what you want to do