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

Add ability to fly to a tracked entity #3653

Open
hpinkos opened this issue Mar 1, 2016 · 7 comments
Open

Add ability to fly to a tracked entity #3653

hpinkos opened this issue Mar 1, 2016 · 7 comments

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Mar 1, 2016

Requested in the forum https://groups.google.com/forum/?hl=en#!topic/cesium-dev/a8bwwV3BYuE

Currently, when viewer.trackedEntity is set, it zooms directly to the tracked entity. I would be nice to have a duration option for this behavior to enable flyto functionality.
This function needs to respect the entity.viewFrom property.

@mramato
Copy link
Member

mramato commented Mar 1, 2016

FYI, this has been on the entity roadmap a long time. It's a pretty hard problem to solve for moving entities. The best way to do it would be to allow camera flights to be scheduled to occur in scene time rather than wall time, then you can fly to the position you know the entity will be at when the flight is over.

@eric79
Copy link

eric79 commented Mar 2, 2016

Alternately, you could query for the position of the trackedEntity at each frame of the interpolation to update the goal position. As a result, the camera would follow a curved path to the tracked entity, rather than a straight line to the goal, but the curved path might end up being more visually pleasing (maybe?).

It would also have the side effect that the camera would speed up as it moved since the distance to interpolate to would grow over time. But that might work out well because ideally, you want the camera's speed to match the speed of the tracked object at the time that it arrives at the viewFrom location ... that way you would not only eliminate the discontinuity in position (as we have now when the camera pops from its out-of-date flyTo location to the trackedEntity positoin), but you could eliminate the discontinuity with velocity, too.

Thanks for considering this. It would be a great help to us. And thanks for all the work you do on cesium in general.

@colek42
Copy link

colek42 commented Mar 8, 2016

Take a look at the paper Physicomimetic Motion Control of Physically Constrained Agents. Might give some insight on how to solve the issue.

@hpinkos
Copy link
Contributor Author

hpinkos commented Feb 1, 2017

A few other users in https://groups.google.com/forum/?hl=en#!topic/cesium-dev/a8bwwV3BYuE have recently mentioned they would like to see this as well

@hpinkos
Copy link
Contributor Author

hpinkos commented Feb 20, 2017

@vekien
Copy link

vekien commented Mar 10, 2017

Would like to see this, is it possible as a temp solution to add duration to Camera Zoom, you can set viewer.trackedEntity = entity; and then I can do viewer.camera.zoomOut(100000); however this Snaps to the zoomed out position. If there was a duration and easing it would be super perfect and solve this issue. (If that isn't the hard bit).

@Maarondesigns
Copy link

Is there a relatively easy way to simply not move the camera at all when setting trackedEntity? I am trying to set the viewFrom property on the entity just before setting it to be tracked, however I always seem to end up a million miles away

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

7 participants