Skip to content

Conversation

@david-lively
Copy link
Contributor

@david-lively david-lively commented Jul 23, 2025

This PR adds support for Orthographic projection. When generating a ViewState from the Unity Camera, we now determine if the camera is using orthographic project and, if so, generate the correct corresponding ViewState.

When Camera.orthographic is true, the Camera.orthographicSize indicates half of the height of the view volume in meters. (See Unity's Camera.orthographicSize documentation for more detail on configuring the camera. )

In the Unity Inspector, these properties are listed under the Projection rollout. The Size property corresponds to the script property Camera.orthographicSize.

Note that this PR modifies Runtime/ConfigureReinterop.cs to allow native access to Camera::orthographic() and Camera::orthographicSize(). Therefore, the Cesium Unity DLL will need to be recompiled.

image image image

@david-lively david-lively linked an issue Jul 23, 2025 that may be closed by this pull request
@david-lively david-lively marked this pull request as ready for review July 23, 2025 16:58
@david-lively david-lively requested a review from kring July 23, 2025 16:59
@david-lively david-lively self-assigned this Jul 23, 2025
@j9liu j9liu requested review from timoore and removed request for kring July 28, 2025 21:30
@kring
Copy link
Member

kring commented Jul 30, 2025

Thanks @david-lively!

@kring kring merged commit 6a47734 into main Jul 30, 2025
11 of 12 checks passed
@kring kring deleted the add-support-for-viewing-tiles-in-iso-orientation branch July 30, 2025 06:44
Comment on lines +5 to +6
##### Fixes :wrench:
- Fixed tile culling when in orthographic view.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my late comment, I'm wondering if we should position this as an addition instead? (The original issue was labelled "enhancement".)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I agree. Before this PR, one could still switch the Unity camera to orthographic; it just didn't work correctly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should put it in "Breaking Changes". Someone may have been relying on the previous behavior where orthographic cameras didn't load tiles.

Just kidding of course! I think a reasonable case can be made for either Fixes or Additions, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting it in Additions would let us bump up our minor version number 😄 But I don't mean to bikeshed, it's fine either way.

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

Successfully merging this pull request may close these issues.

Add support for viewing tiles in Iso orientation

4 participants