Jump to content

How to create and attach a new part in the Editor to an Attachment node


Recommended Posts

I thought this would be simple, but it's not :-(

Adding the attachment nodes was easy, but now i need to create a new part and attach it to the new attachment node.

The part being created will have a single node, it's going to be a small engine.

So, my problem is this:

  1. How to create the part?
  2. How to attach it to an existing node when I have the node information?

I know that I can get the ShipConstruct from the EditorLogic class (called ship), I know about the parents, and don't need help (I hope) with that.

and that I can add the part to the ship using  ship.Add(part), but where I'm stuck is in creating a new part, and then, how to set it so that it is properly attached to the desired attachment node.

Thanks in advance.

Edit:  I've successfully created a part and am adding it to the vessel, but what I need to do is the following:

  • Existing part has an attachment node, called rep_1
  • New part has a node, called node_stack_bottom (I believe that when read, it is really "bottom")

 

  1. Orient the new part so the two nodes are facing each other
  2. Attach the new part via the attachment nodes

I could even just skip the attachment nodes totally, and attach the part directly, but then I would still need to orient the new part correctly, and then place it at calculated positions.

Edited by linuxgurugamer
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...