Jump to content

coconuts

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by coconuts

  1. As in the title: How would I spawn an empty dummy part in flight mode? Preferably: No needed .cfg file: Just spawn the part and initialize it on-the-fly. Reason When I just AddComponent<Part>() I see a stream of NullReferenceException in the log. I'm assuming there is something wrong with just constructing it as-is, and I'm at a loss as to what else needs to be added to it in order for it to function. I need to add a part to a vessel in flight in order to force KSP to update the associated transform whenever it changes coordinate frames. This has been an issue with joints created between dynamically-generated bodies and other parts - when the vessel changes coordinate frames, it causes the joint to correct itself in the wrong frame (the other body, not associated with a part, did not change coordinate frames with the rest of the vessel). Just adding a part to the related object, then adding the part to the vessel's part list fixes the coordinate frame transition issue, but I see a stream of null reference exceptions. On the other hand, it would be preferable to hook into an event for this, but I have no idea what that event or override might be.
  2. Looking at the configs, all parts have an inverted "node_stack_bottom" normal: In ALL .cfgs, juts change the value highlighted red: node_stack_bottom = 0.0, xxxx, 0.0, 0.0, 1.0, 0.0, 2 to: node_stack_bottom = 0.0, xxxx, 0.0, 0.0, -1.0, 0.0, 2 This will allow attachment to the lower node.
×
×
  • Create New...