-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Solve the issue of #11877 #11907
Open
HapDragon
wants to merge
11
commits into
CesiumGS:main
Choose a base branch
from
HapDragon:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Solve the issue of #11877 #11907
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
af0a45a
modify the terrain adjust condition
HapDragon ace2829
Merge branch 'CesiumGS:main' into main
HapDragon 3354f5c
Merge branch 'CesiumGS:main' into main
HapDragon 13cdb2d
Merge branch 'CesiumGS:main' into main
HapDragon ca2e7c0
change adjustHeightForTerrain function
HapDragon 742f5a7
Update ScreenSpaceCameraController.js
HapDragon d61f710
Update ScreenSpaceCameraController.js
HapDragon 235c08f
Update ScreenSpaceCameraController.js
HapDragon c542b28
Update ScreenSpaceCameraController.js
HapDragon 088f005
Update ScreenSpaceCameraControllerSpec.js
HapDragon 31544b9
Update ScreenSpaceCameraController.js
HapDragon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the use of
controller._minimumCollisionTerrainHeight
here. That value was design to be the height above the ellipsoid surface, not the absolute value.Additionally, that put us in this strange "middle ground" where the camera still re-orients strangely, like in this example below:
How would you feel about instead using a percentage of the ellipsoid radius? That will ensure we scale to other ellipsoids if needed without having to manually set a value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello ,
At line 2897, the comparision: controller._minimumCollisionTerrainHeight, it seemed should not be such a value. What I thought is to put a threshold to specify the maximum centric length of cartesian3, then let any point in a centric ball with the threshold radius will not do the height adjustment (if there is a transform upon the camera).
Thanks for your advice, I am a little confused about using a percentage of the ellipsoid radius. Does it mean using percentage of ellipsoid radius as the height threshold test?
I modify the adjustHeightForTerrain function again: it will avoid the problem in your example above and issue of #11877 as well:
It use this code to filter point in deep underground areas:
(defined(transform)&&cartographic.height>-ellipsoid.maximumRadius*0.3)