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

Animate viewFrom (Cesium czml) #150

Open
misterbighead opened this issue Jun 18, 2018 · 4 comments
Open

Animate viewFrom (Cesium czml) #150

misterbighead opened this issue Jun 18, 2018 · 4 comments

Comments

@misterbighead
Copy link

I would like to move my camera smoothly around my aircraft. With viewer.trackedEntity = airplane, I have tried including multiple camera positions in czml:

"viewFrom" : {
	"epoch" : "2012-08-04T16:00:00Z",
	"cartesian" : [
	0, 100.0, 100.0, 100.0,
	100, 200.0, 200.0, 200.0
	]
}

But the camera stays locked in one position. Shouldn't this work? (https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/ViewFrom says "Interpolatable: yes")

Or is there a way to animate viewer.camera.position dynamically?

@shunter
Copy link
Member

shunter commented Jun 18, 2018

viewFrom only affects the initial camera view when the entity becomes tracked in the viewer. If it was applied every frame, it would lock out interactive mouse control. The property does depend on time, so the value will be calculated using the current simulation time, which means you could have different initial offsets at different times, though this is of limited usefulness, admittedly.

More complete programmatic camera control is something we'd like to add in the future.

@misterbighead
Copy link
Author

What is the most elegant way to animate the camera to move smoothly?

@custompro12
Copy link

applied every frame, it would lock out interactive mouse control

It seems intuitive from the docs and from how the position interpolation works that this would be the default behavior and I think this would satisfy our "pan camera smoothly around tracked entity" use case.

only affects the initial camera view when the entity becomes tracked

Maybe this should be an opt-in/out behavior provided by some other viewFrom parameter

@mhaberler
Copy link

viewFrom only affects the initial camera view when the entity becomes tracked in the viewer. If it was applied every frame, it would lock out interactive mouse control. The property does depend on time, so the value will be calculated using the current simulation time, which means you could have different initial offsets at different times, though this is of limited usefulness, admittedly.

More complete programmatic camera control is something we'd like to add in the future.

I think being able to tie camera view to an InterpolatableProperty would be very useful

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

No branches or pull requests

4 participants