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

Change CesiumCameraController and CesiumFlyToController to use CesiumGlobeAnchor on parent GameObjects #422

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

azrogers
Copy link
Contributor

Closes #415.

Currently, the CesiumCameraController and CesiumFlyToController expect to be on an object with a CesiumOriginShift and CesiumGlobeAnchor present. This makes it difficult to setup on XR rigs, as detailed in the issue above. This changes both classes to use CesiumGlobeAnchor components present on parent objects, while using the Reset event to still create an anchor if none is present, as was the previous behavior.

Copy link
Contributor

@csciguy8 csciguy8 left a comment

Choose a reason for hiding this comment

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

Looks good @azrogers!

Locally tested unity samples and ran the unit tests. Code looks to preserve the original behavior like you stated.

Will merge once CI completes...

@csciguy8 csciguy8 merged commit 82e6646 into main Feb 28, 2024
6 checks passed
@csciguy8 csciguy8 deleted the camera-parent-anchor branch February 28, 2024 22:56
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.

Allow CesiumGlobeAnchor to be attached to parent object in CesiumCameraController
2 participants