Jump to content

Zorkinian

Members
  • Posts

    136
  • Joined

  • Last visited

Everything posted by Zorkinian

  1. I suspect this change is affecting IVA mods (e.g. RPM) that were displaying a NavBall: * Hide UI elements that aren't being used and avoid unnecessary updates in flight mode. These mods were grabbing the UI NavBall as follows: navBall = UnityEngine.Object.FindObjectOfType<KSP.UI.Screens.Flight.NavBall>(); And calling NavBall.relativeGymbal to both directly mirror onto their own navball-like objects, as well as transform it into heading/pitch/roll. If you switch to IVA in 1.10, after ~0.5 seconds the relativeGymbal call stops giving new values, and as a result these derived navballs/values are "frozen." It seems like there are at least a few ways to work around this: 1) Is there some way to ask the NavBall to keep updating even when not visible? 2) The stock IVA navball continues to function, so something much like the relativeGymbal call is still being calculated somewhere. Is that currently exposed anywhere, and/or is there a way to reconstruct it using other available vectors & quaternions?
  2. I haven't run in debug mode yet to confirm, but Manul definitely seems on the right track. Heading/Pitch/Roll are calculated by directly finding the KSP NavBall and pulling information out of it. If the NavBall is no longer updating under the hood, RPM would also get no updates: https://github.com/JonnyOThan/RasterPropMonitor/blob/f79d1d4c3e99132e3ebcf6caf3a8cd26b34ff7a9/RasterPropMonitor/Core/RPMVesselComputer.cs#L675 https://github.com/JonnyOThan/RasterPropMonitor/blob/f79d1d4c3e99132e3ebcf6caf3a8cd26b34ff7a9/RasterPropMonitor/Core/RPMVesselComputer.cs#L1130 https://github.com/JonnyOThan/RasterPropMonitor/blob/f79d1d4c3e99132e3ebcf6caf3a8cd26b34ff7a9/RasterPropMonitor/Core/RPMCEvaluators.cs#L1293 If there's some way to force the NavBall to continue updating, that should help things; if not, then the rotationVesselSurface data will have to come from some other source.
  3. Just for those who may not remember, this is coming from the KSP 1.10 changelog: https://wiki.kerbalspaceprogram.com/wiki/1.10
  4. Thanks a lot for taking a look! As always, we deeply appreciate your work on this project. KSP is greatly enhanced by the IVA experience.
  5. It's probably better for you do that yourself; I don't fully understand your issue, and if they ask any clarifying questions, I won't have your context.
  6. I only used the stock initial pod, but the MFD screens were working. It looks like my issue is better documented on the github: https://github.com/JonnyOThan/RasterPropMonitor/issues/15
  7. I am seeing an issue similar to hotcookie - I have a 1.10 KSP, and have only installed DE_IVA Extension and its dependencies. Most aspects of the stock command pod work, but: * The navball on the MFD does not rotate * Switching between normal view and IVA view cause the navball to move for ~0.5 seconds before freezing again * All MFD pages seem to function well; even the one containing the navball updates things like the prograde/retrograde marker and the various numerical readouts, it's only the ball itself that seems jammed.
  8. Is there a way to set a default view when using VesselView as part of RasterPropMonitor / MultiFunctionDisplay? I really enjoy this mod, but I'd like avoid setting up all my settings for every single launch. (In fact, is there a way to default all the RPM/MFD windows for a given command pod type? It would be really nice to just go to the launchpad and have my favorite set of windows already active...)
  9. Just a quick note - I'm also looking into solutions (though I'm a bit behind you). Since you're already doing a bunch of investigation into translation, I'm going to spend some time looking at creation (creating the ship at the target coordinate). I'll keep you posted. =]
  10. Oh, my bad - it doesn't exist, I was suggesting that you create it (or something like it) that would then be consumed by other modders. My bad =]
  11. Have you considered letting other objects identify as fuel sources? Say, any part that implements some interface like...ITransferrableFuelSource? This is of particular interest to me - my mod Orbital Construction allows people to store fuel up in SpaceDocks for ship construction. However, it would be cool to let passing ships also draw off that fuel supply for mid-mission adventures. The SpaceDock part definitely isn't a FuelTank, and probably shouldn't try to inherit from it, but it does have its own model for storing/releasing fuel. In addition, I'm sure other modders will think of interesting ways to create fuel sources (like a mining platform on Minimus, maybe some sort of scoop to be deployed in the Sun's corona or on a gas giant) - creating a platform they can work off would be interesting. =]
  12. Very cool mod! I'm excited about the potential here. You did some pretty clever stuff in the source! A few notes: In FuelTransferModule.cs: Line 217 - Unity already has really good vector math. You can just do something like: Vector3 difference = a.transform.position - b.transform.position; float distance = difference.magnitude; instead of re-implementing the vector math yourself! Also, I like your search through the partloader to figure out the original fuel level of the part. That's something that has eluded me for the longest time. It seems like the real challenge is figuring out how to reactivate "dead" parts, assuming that's something that can be done via the API.
  13. Let\'s say I have Vessel A and Vessel B. They\'re close enough to each other (< 1km) so they\'re both loaded into physics and such. I want to make Vessel B have the same heading as Vessel A, but I\'m not sure how to do it well. I\'ve tried messing around with the SetRotation (don\'t have the API with me, might be wrong name), but the sudden rotation causes Vessel B to explode. Any suggestions?
  14. Here\'s the solution that first comes to mind: 1) Right when you load the craft in, traverse the part hierarchy, and get some sort of unique ID for each part (a hash or something, not sure exactly how that would be implemented) 2) For each part, find out its current fuel, and save that to a list somewhere, mapped to that unique ID 3) When you want to refuel the craft, lookup each part in the hierarchy, and use your map to determine its original max fuel. There are some edge cases, but maybe this general idea would work?
  15. Well, Orbital Construction is back online, but I should remind you that the precision of the teleports is +/- 1km or so (maybe larger numbers further away from KSC), so it may not be what you need for fine-tuning =P
  16. Yeah, I read through the wiki, but still don\'t understand what steps I need to take.
  17. With the advent of .15 and the IO namespace forbidden... how do you write to a file? I have a Dictionary<string, int> that\'d I\'d like to write to and read from, but I can\'t figure out how to do it with the new API. In the past I used a BinaryFormatter to serialize it to a file, but that requires streams from System.IO. Is there a drop-in replacement, or will I need to do something else?
  18. Indeed... but where should that logic live? In WindowGUI? DrawGUI? onPartStart? I could put it everywhere, but that seems like overkill.
  19. So, I shamelessly borrowed some code from the temporary wiki to create my in-flight GUI (http://kspwiki.nexisonline.net/wiki/Module_code_examples#Creating_a_GUI_Window_and_Button) I was having occasional render issues, and it took me a while to find the cause - if you have two ships, each of which have a part that generates a GUI, as you approach the second ship (and cause it to load/activate) both GUIs attempt to draw on screen, which causes some issues. How can that code be modified to allow multiple ships running the same part?
  20. I actually can\'t access your source for that file (winrar says there\'s an unexpected end of file) - how did you normalize the relative velocities of the objects? That is, when you moved the vessel to another area, how did you also get it to enter the same orbit?
  21. Bingo! The_Duck, thanks for the insight. I think with that I\'ve figured out an important step towards destruction-free teleportation. 1) The ship can\'t be resting on the pad. First you have to (one way or another) get it to not be contacting the ground 2) call something like the following code: vessel.GoOnRails(); vessel.transform.position = new Vector3(0, 0, -100000); vessel.GoOffRails(); Bam! Your vessel now up 100,000m. No switching of perspectives or other shenanigans.
  22. I\'ve seen a few mods in the past that were moving objects around - what do I need to do to move the currently focused ship to arbitrary positions in space? Thanks, -Zorkinian
×
×
  • Create New...