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

Rotating the camera on terrain #549

Closed
emackey opened this issue Mar 7, 2013 · 3 comments
Closed

Rotating the camera on terrain #549

emackey opened this issue Mar 7, 2013 · 3 comments

Comments

@emackey
Copy link
Contributor

emackey commented Mar 7, 2013

Using middle-mouse-drag to rotate the camera over terrain feels awkward and is difficult to navigate. I believe the current behavior is to fire a ray through the middle of the screen and hit the ellipsoid, and rotate around the ellipsoid intersection point.

Note that I'm NOT suggesting we fire the ray through the mouse location, as GE does (maybe we should add that option, but that's separate from this particular issue).

This issue relates to the ray that was fired (through the viewport center) hitting the ellipsoid instead of hitting the terrain. Really it needs to hit the terrain, if enabled, and rotate there. If it "misses" the terrain, we can fall back on the normal "closest-point-on-the-ellipsoid" trick.

Implementing this may require the "hit" point to be remembered once the mouse is pressed down. Otherwise, a mountain might move in between the viewer and the current center of rotation, and "steal" the center of rotation. Remembering this point is actually good for a number of reasons, such as preventing the rolling-towards-the-camera effect, and will make it easier to implement mouse-point-rotation later if someone requests it.

@emackey
Copy link
Contributor Author

emackey commented Aug 22, 2013

Should this be on the camera roadmap, #1060?

@emackey
Copy link
Contributor Author

emackey commented Aug 22, 2013

Also, although this issue is titled "rotating", it affects panning as well. Cesium makes use of the concept of grabbing a specific point on the globe and moving it. When you "grab" a mountain, you miss the mountain and end up grabbing a point on the ellipsoid behind and below the mountain. It makes the camera feel clumsy and the terrain feel fake.

@pjcozzi pjcozzi mentioned this issue Aug 22, 2013
19 tasks
@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 22, 2013

Should this be on the camera roadmap, #1060?

Yes, I added it. I made the roadmap as a brain dump of ideas, but also tried to include major existing issues. I missed this one.

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

No branches or pull requests

2 participants