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)