Jump to content

For Future Reference: Prevent surface attachment on a specific collider


lo-fi

Recommended Posts

After a bit of digging prompted by the thread here I found that colliders on the new stock cargo bay doors have a tag called NoAttach set (note, this is a tag, not a layer and does not need to be a specific number in the list when you rig in Unity). This prevents parts being attached to the animated doors and being left behind because KSP creates joints between the root gameobject of parts, rather than the colliders they are placed on in surface attachment mode. A useful little bit of info I thought I should share in an easily googleable fashion. I suspect this is new in .25, and I'm sure will prove useful to many people, myself included.

EDIT to clarify: set the tag on the GamebOject that contains the collider you don't want parts to be surfaced attached to. This may, or may not be the mesh; it could also be a child GO with a collider component added. Either way, set the tag on the GO with the collider applied. It won't just apply to bay doors, it could just as easily be a heat shield, wheel, turret etc..

Code for a little plugin to print layer numbers and tag names for specific game objects is in the thread linked above, licensed CC0.

Have fun with your cargo bay creation!

Edited by lo-fi
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...