Is there a way to get camera orientation values like heading, pitch, tilt, roll as i set the camera view on cesium globe dynamically?

Is there a way to get camera orientation values like heading, pitch, tilt, roll as i set the camera view on cesium globe dynamically ?

You can get the values by calling it as a member variable, for instance camera.pitch. Documentation for camera can be found here.

1 Like

Hi Dzung,

Thanks for replying.

Yes i am too playing around this to get these as members.
Incase you found some working example, please share.

Thanks,
Kulvinder Singh

Check this sandcastle

3 Likes

Thanks @11115

Can we get these values on click instead of camera changed event ?

It’s like i choose a view and set it on a city, click on the city and lock the view. Now i want the camera orientation values.
Thanks in advance

You can look into the setInputAction. Here is a sandcastle example of how you can get the camera orientation values by left clicking the view port.

1 Like

Much thanks @dzung

1 Like

Hi @dzung,

I am trying to capture camera height and tilt, used the following but not able to, can you please check if these are the correct nvps:

(viewer.camera.tilt) == return undefined
(viewer.camera.height) == return undefined
(viewer.camera.altitude) == return undefined

The camera has a position vector (viewer.camera.position) that you can extract height from.