Properly scale the clouds in modified main menus #12
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.
If you replace the body in the main menu using Kopernicus, the scale of the clouds is messed up for bodies that don't have the same size as Kerbin.
For example Eve, which is bigger than Kerbin, has it's clouds floating multiple kilometers above the planet model, while Laythe's clouds are completely missing, since Laythe is smaller than Kerbin.
The reason for this is, that Kopernicus has to rescale the bodies in the main menu to match the exact size of Kerbin. (i.e. a radius of 600000m or 100 scaled space units).
Since EVE cannot really know which body is represented in the main menu, it always assumes the scale of Kerbin for the clouds. However, in combination with using the (changed) planet radius this seems to causes the described bug.
The solution I came up with is to change the hardcoded Kerbin scale to a dynamically calculated scale in the main menu. This yields the same results for Kerbin, and accurate results for every other body.