Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limiting Camera Tilting #9689

Closed
srothst1 opened this issue Jul 21, 2021 · 8 comments · Fixed by #12169
Closed

Limiting Camera Tilting #9689

srothst1 opened this issue Jul 21, 2021 · 8 comments · Fixed by #12169

Comments

@srothst1
Copy link
Contributor

srothst1 commented Jul 21, 2021

This issue stems from the following community forum post: https://community.cesium.com/t/how-to-limit-tilt/14459

There has been a significant history of community forum questions/complaints related to camera functionality in CesiumJS. Limiting the camera tilt can help prevent users from ending up "underground" or getting lost in the scene by moving the mouse rapidly to tilt the camera to view both extremes (+90 degrees, -90 degrees). Adding an additional function called limitTilt() to the Camera object may make sense, although other suggestions are welcome.

In offline discussion, both @lilleyse and @ebogo1 seem to support this feature as well. Here is a sandcastle demo that showcases how this feature might perform:

https://sandcastle.cesium.com/#c=lZRfb9sgFMW/CvKTI3l4Ux/rRJPSvlVb1Sp78guBmwQVA+KPq27qdx829upgb8keIsWXc373cgxuiUEth1cwaI0kvKItWO4b/KOv5XVG++etko5wCabOVre1bIPrKNQegim6saUgAffFQUBJA4akilgNkiiy1BBHT9+UaYg4H2FLjAv/iLzJx57aQMuVt4/KcseVvNpwxw3Q/3Ls9NXSJ348uX+qg36agVbW7TQjDjBh7L4F6R64dWHJ5Acv+0HzFfpVS4S6RnJMp48XgxBcW8UZPoJi4Dh99uZAKMQU886Ghvi7Xn1URaye5d2V4nixD1Pu0Sjmabeb2U5wWM4HKhvzLIbhOgxC3Y8fUD4Bbdbo02d8M+xmNtZiIyqUhDx92UXqjT3/INnkHV9i3n3Mn7oTqtdX4Ha6+NAnADOcjkuM/hQVZ65IekcgLIz5LVyBv5HTEzDzjpMu3ZIL0MkBmLlT7E5f5nldTPQp4elChtPQinPXkGEt31e3WZFV1r0J2EQ8Ql95o5VxyBuRY1w6aLQI19KWe09fwGFq7ThLVU6tFeMt4my98IFEVBBrw8rBC/HMf0Kdbaoy6GdWoQjj8vi9BSPIWyc7fdk8xCLGuCrD47LTKSX2xCTk3w

While this demo is not perfect, it should give readers an idea of what we are looking for.

@lilleyse
Copy link
Contributor

This would be a really welcome feature.

My thinking is that it would a property called minimumTiltAngle in ScreenSpaceCameraController. The implementation would be almost completely be in ScreenSpaceCameraController instead of Camera.

@robmilton
Copy link

robmilton commented Jul 21, 2021

I agree this would be a really welcomed feature. I'm not sure what the various additional use cases may be. But I’d like to emphasize the REASON I’m wanting to limit the tilt (and the reason expressed by many forum posts over quite a few years) is to avoid the problems that can be experienced when tilting the scene. These problems include apparently ending up underground or getting entirely lost in the scene (completely turned around, in black space, don’t know where you are). It’s even possible to sometimes get into a state that Cesium can’t recover from.

More details related to this issue and some videos showing various problems that occur when tilting the scene using the Hello World Sandcastle demo can be found at the community forum post: https://community.cesium.com/t/how-to-limit-tilt/14459

@robmilton
Copy link

Hey guys... any idea if this feature will find its way to production in the near future?

@ebogo1
Copy link
Contributor

ebogo1 commented Aug 16, 2021

@robmilton At this time it doesn't seem like we'll be able to get to this in the near future, but we have this and other Camera fixes in mind for when we get a chance to work on them.

@ebogo1
Copy link
Contributor

ebogo1 commented Sep 21, 2021

This PR might fix this if merged - #9147

@robmilton
Copy link

Hey guys, there have been multiple requests and pull requests over the past couple of years related to limiting the tilt (particularly to avoid scene crashes). Is there any chance this will be addressed before long?

@ggetz
Copy link
Contributor

ggetz commented Apr 4, 2022

Hi @robmilton, no immediate updates. As @ebogo1 said, we do think the Camera API needs some attention, but currently don't have any immediate plans for the team to work on this.

If you are interested in contributing a fix, we'd be happy to discuss the approach ahead of a pull request so that we're on the same page about the implementation.

@BrunildaArup
Copy link

has anybody found a way around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants