Is there a way to calculate camera tilt in cesium ?

I can get Roll as Cesium.Math.toDegrees(viewer.camera.roll);

but not sure why titl is not working in this equation Cesium.Math.toDegrees(viewer.camera.tilt);

Is there a way to calculate camera tilt in cesium ?

I can get Roll as Cesium.Math.toDegrees(viewer.camera.roll);

but not sure why titl is not working in this equation Cesium.Math.toDegrees(viewer.camera.tilt);

There is no tilt member for camera class in Cesium. There are heading, pitch, and roll.

@kulvinderjatt so funny I just asked this same question: How to determine camera tilt or direction relative to the surface?

Looks like what youâ€™re looking for is the `camera.pitch`

. The value is is Radians, if you do `camera.pitch * (180 / Math.PI)`

you will get degrees.

The camera looking straight at the ground is -90 degrees.

Looking at the horizon is 0 degrees.

Looking straight up is 90 degrees.

Hope this helps!

1 Like

Thanks @brianpmaher.

Yes i am able to calculate pitch, roll and heading values. Since there is no tilt in cesium as @dzung confirmed, so we cannot have this value.

Thanks both of you!

1 Like