Open JonnyOThan opened 1 year ago
"I broke in with the debugger and the floating origin offset is very large, which means the transform math that unity is doing to get the camera near the KSC is completely breaking down. I suspect fixing this is as simple as calling FloatingOrigin.fetch.ResetOffset when returning to the KSC view (but this is probably not a complete solution because it seems to be hardcoded to the launchpad)."
Kopernicus has offered a solution to this using exactly that for some time. It's called "ResetFloatingOriginOnKSCReturn" boolean option in Kopernicus_Config.cfg or the GUI, default false because as you suspected, it's imperfect and breaks some mods (ones that move the KSC, or KK in particular).
I think it should remain in Kopernicus as it's largely applicable to modded systems but I'd welcome PR's to improve it.
Is this reproducible in stock / at stock planetary system distances ? If so, it might be worthwhile to handle it from KSPCF In the other case, I agree with @R-T-B that letting Kopernicus handle such issues is a better option to avoid useless stock behavior changes that might interact badly with something else.
AFAIK it's only applicable to extreme modded distances.
That's a fairly extreme modded distance, yes. Has the user there tried the Kopernicus option I mentioned as a workaround?
@R-T-B that post doesn’t mention the distance or mods, just that it was a “voyager” craft - so I assume on an escape trajectory out of the system.
I’ve been using the kopernicus option and it helps, but it’s not always sufficient because it only does one iteration of resetting the origin. Because of the math involved, it’s possible for there to still be a large offset after calling that function.
Ah, I assumed "Voyager" meant an RSS-style replica of Voyager. Which would be pretty far out there.
Anyways, I know my fix is imperfect but to date I've yet to find a better fix.
If your vessel is very farm from kerbin (or whatever your homeworld is) and you press escape -> return to space center, this can happen (or worse): https://imgur.com/ccaWYrA
I have a hunch that this is what's responsible for all those pictures of "flooded" KSC.
I broke in with the debugger and the floating origin offset is very large, which means the transform math that unity is doing to get the camera near the KSC is completely breaking down. I suspect fixing this is as simple as calling FloatingOrigin.fetch.ResetOffset when returning to the KSC view (but this is probably not a complete solution because it seems to be hardcoded to the launchpad).