I’m messing around with something that should be simple I believe.
I have two cameras (change from arc-rotate with kb ‘1’ to universal(fps-like) with kb ‘2’) in this PG.
Case is: When using the fps-like camera, I want to request a pointer lock. And when I switch to the arc-rotate camera, I want to remove the pointer lock and then also the click event/listener. But for whatever I tried, it looks like the click always remains.
I have this PG that I polluted with multiple attempts trying different ways, so I hope you’ll still find your way through :
May be better to look at this earlier version that does not include all of my clumsy attempts
Originally, it was based on this PG:
and then this topic as an alternative:
In the end the question is: How do I remove the fancy pointer lock on camera change?
UPDATE: Back on it this morning with a fresh mind and I figured that requesting a pointerLock from the click on canvas when I actually have different cameras and a number of GUIs I want to interact with is definetely not a good idea.
So, change of strategy here and I removed the click event. The pointerLock shall occur or exit depending on camera selection or on button or kb. That’s it, that’s all.
Sorry for wasting your time looking at what was in fine a non-topic (a stupid approach demonstrating my lack of strategy for this). In fact, I’m still not sure at this point how just exactly my cameras and pointer interactions will work. Sketching phase and WIP. I’m likely to be back with more the way I feel it just now.
Meanwhile, have a great day