So I have noticed I am able to fully rotate around the scene if I drag my mouse along the tabs of the browser or the windows task bar I am wondering if there is a way to limit the rotation or even better not to rotate the scene at all when the mouse leaves it or have the scene still rotate even if the mouse isn’t hovering on the scene …
I hope this makes sense heres a video of the problem:
It seems you are using OrbitControls
with enabled damping, right?
If so, consider to only call controls.update()
if the pointer is over the screen. This can be detected in various ways, e.g. via pointerleave
and pointerenter
event listeners.
https://jsfiddle.net/b0Lgzwf7/
TBH, I find the resulting behavior confusing. I don’t think I would add this to my app…
1 Like
Thanks for the reply I’ve tried with this method before the problem is I can put my mouse in the top left corner of the browser window (so its on the tabs) move the mouse to the far right along the tabs and then rotate the scene from there so in affect I can still rotate the scene 360 degrees if I do this enough times I don’t know if that makes sense?
Also right to left