Jump to content

Radial Parts


Naten

Recommended Posts

Okay, how do I set things up in Unity so the center of the part is not where it attaches to other parts when you radially attach it? :(

I'm tired of my jet plane having two engines inside its fuselage's end. :mad:

Thanks.

Naten

Link to comment
Share on other sites

KflC7RE.png

Here is a pic from one of my boosters in Unity. I have the camera turned a little so you can see which way the colored arrows are pointing. The Red arrow is the X axis and is pointing to the + side, and would be directly to the RIGHT in the VAB. The Blue arrow is Z axis and would be pointing Forward, and the Green is Y and is pointing UP. Those are all the + axis directions, and the opposite is the - side (so -X points LEFT)

My origin is right in the cenrer of the cylinder (but towards the bottom of its length, but that is not important) and its diameter is 2 meters. That means its 1 meter from the center to any place on the outside of the cylinder (its circumference)

If I wanted it to attach directly to the RIGHT of the origin where +X intersects the surface, then I would set up the attach node to do so:

node_attach = 1, 0, 0, 1, 0 ,0

The first colored number tells KSP to move the attachment point 1 meter on the X axis from the origin; that will align it with the surface of the tank where you want it to be.

The second colored number tells KSP to rotate the part so that the +X axis is pointed towards the part you want to connect to radially. These are actually angles and you can set up some complex rotations if you know your trigonometry, but for now, assume you'll be setting either X, Y, or Z to 1 and leaving the other two as 0.

Now as you asked earlier, some parts like a radial decoupler, a RCS block, connection struts or whatever might be set up so their origin is right on the surface you wish to attach on, so you don't need to move the attachment point, only tell it which way to rotate:

node_attach = 0, 0, 0, 1, 0, 0

In this case none of the 1st three digits are non-zero because you don't want to move the connection node. Then +X is set to one, which will tell KSP to rotate your part so that side faces 'inward' to the part you're connecting to.

Keep in mind that you can move the connection node in any direction. In my tank example, maybe I want it to attach higher up on the tank than where the origin is. (this is important because your mouse always picks up a part by its surface attach node, and you attach it where your mouse clicks on the other part) So that means I might want to move the node up 3 meters as well as out to the edge of the tank on the X axis:

node_attach = 1, 3, 0, 1, 0 ,0

So the red number moves it along the X axis to the surface as before, but the green number moves it UP 3 meters, while the 3rd colored number is still telling it to rotate to +X

That covers the basics. Sometimes it may not come out exactly how you expected it to, usually because the model was rotated in Unity for some reason. So when you try to attach it, its flipped around inside the other part. Its an easy fix though, just flip the positive/negative sign in your config:

node_attach = -1, 0, 0, 1, 0, 0

or

node_attach = 1, 0, 0, -1, 0, 0

You might have to try both depending on the exact setup of your part in Unity. Once you work with it a bit you'll figure it out.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...