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

Camera tilt does not work in ICRF #544

Closed
pjcozzi opened this issue Mar 6, 2013 · 1 comment · Fixed by #1516
Closed

Camera tilt does not work in ICRF #544

pjcozzi opened this issue Mar 6, 2013 · 1 comment · Fixed by #1516

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Mar 6, 2013

via @emackey

Zoom in to the Earth surface, and use the middle-mouse-drag to tilt the view down so you can see the horizon.

It tilts crazily and doesn't show a level surface view. I presume this is something to do with ICRF frame...

@bagnell when you need a break from the polyline work, we should address this. I'm sure some data is out-of-sync.

@ghost ghost assigned bagnell Mar 6, 2013
@mramato
Copy link
Contributor

mramato commented Mar 6, 2013

You don't even have to zoom in, just using the middle mouse button in the default view causes issues. This is definitely an ICRF problem. I would not debug it in the 2012DA14 asteroid branch because that was a one-off and is pretty out of date. In order to reproduce the issue in any branch, just replace CesiumViewerWidget update function with this. (the else block is the only new code).

        update : function() {
            var currentTime;
            if (this.clockViewModel.owner === this) {
                currentTime = this.clock.tick();
            } else {
                currentTime = this.clock.currentTime;
            }
            this.visualizers.update(currentTime);

            // Update the camera to stay centered on the selected object, if any.
            var viewFromTo = this._viewFromTo;
            if (typeof viewFromTo !== 'undefined') {
                viewFromTo.update(currentTime);
            } else {
                var mode = this.scene.mode;

                var camera = this.scene.getCamera();
                if (mode === SceneMode.SCENE3D) {
                    this.foo = Transforms.computeIcrfToFixedMatrix(currentTime, this.foo);
                    if (typeof this.foo !== 'undefined') {
                        Matrix4.fromRotationTranslation(this.foo, Cartesian3.ZERO, camera.transform);
                    }
                }
            }
            return currentTime;
        },

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.

3 participants