Jump to content

[Solved] Surface Attachable Parts - Orientation and Unity Setup


Recommended Posts

Are there any rules for setting up pats in Unity for parts specifically made to be surface attached? Do the colliders need to be oriented a certain way in relation to the Parts Tools empty object so that when they are placed on a surface, they are facing the "correct" way and don't need to be rotated?

Also, with regards to surface attaching, is the point of attachment based on the parts CoG or is it dependent on the collider?

 

Here is a part I am working on, but have similar issues with other surface attachable parts I am creating. I have it oriented in Unity so that it is displayed properly in the Parts window in the left pane [first image in the album]. However, when trying to surface attach the part to a craft, it requires to be rotated along 2 axis [second image in the album].

 

 

Edited by cxg2827
Link to comment
Share on other sites

3 minutes ago, cxg2827 said:

Are there any rules for setting up pats in Unity for parts specifically made to be surface attached? Do the colliders need to be oriented a certain way in relation to the Parts Tools empty object so that when they are placed on a surface, they are facing the "correct" way and don't need to be rotated?

I think you just set your collider to match your part in Unity, whatever the part's orientation is...
Your top level, empty GameObject will have the final orientation, for how the part shows up in-game... So you set it for howver you want your part to start out...It doesnt matter that its a surface attach part or not...
 

12 minutes ago, cxg2827 said:

Also, with regards to surface attaching, is the point of attachment based on the parts CoG or is it dependent on the collider?

Neither... Its based on whatever coords you assign to "node_attach = " in the config... I gather "node_attach" is SPECIFICALLY a surface attach point, or node... I dont think you even need a "node_attach" defined in the .cfg if you have srfAttach set to "0" in the attachment rules...

 

Link to comment
Share on other sites

it's based on offset from the root position. has nothing to do with collider.

node_attach = Offset from Root X, Y, Z, Direction X, Y, Z, node Size (not used in surface attach).

e.g. node_attach = 0,0,0,1,0,0,0 will attach from the part's root; with the root's +X pointed at whatever it is attaching to.

Edited by nli2work
Link to comment
Share on other sites

2 hours ago, Stone Blue said:

Neither... Its based on whatever coords you assign to "node_attach = " in the config... I gather "node_attach" is SPECIFICALLY a surface attach point, or node... I dont think you even need a "node_attach" defined in the .cfg if you have srfAttach set to "0" in the attachment rules...

 

2 hours ago, nli2work said:

it's based on offset from the root position. has nothing to do with collider.

node_attach = Offset from Root X, Y, Z, Direction X, Y, Z, node Size (not used in surface attach).

e.g. node_attach = 0,0,0,1,0,0,0 will attach from the part's root; with the root's +X pointed at whatever it is attaching to.

 

Thanks guys, I realized my mistake as I didn't even have a "node_attach" assigned in my CFG. I was assuming that the surface attachment was based on mating of the collider surfaces (solidworks mindset).

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...