Course Plotting Redux
Hey Folks! I spent most of the day working on the system/course plotter UI today, in my continued attempt to make it reliable and usable enough to get from point A to B.
Initially, my work was more UI-related, as I fixed a few more shortcomings in the widgets. The "Engage" button didn't work the first time it was pressed, and the currently engaged course wasn't being re-loaded when the UI re-opened. (It was calculating a fresh course based on current info instead.) So I fixed these issues, and added some fast-forward hotkeys that would work from within the UI (fast-forwarding the whole game, not just the plotter UI).
Then, upon further testing, I noticed a bug in the course-plotter. If I start really close to a planet/moon, the predicted plot doesn't end up anywhere close to where it should. As if it's trying to go to the wrong place (and/or time). It turns out there was one small-yet-significant bug in the code that checked a body's position if it had a parent: it was forgetting to reset the parent's current time correctly after querying, causing future checks to be off. So I fixed that.
There was also a bug which was setting a destination velocity even if the user didn't request it. Again, causing the course to be off in some cases.
And now, it's better, but still off. I've already found a Unity quirk that just ignores really small vectors (similar to a precision issue, but not actually precision and only true in Unity). After fixing that, it still seems off, so I think we're looking for yet another bug. I'll resume looking into that tomorrow.
Sheesh! I thought this was in the bag, but I guess not!