Jump to content

(Answered): Trouble with non-hollow cargo bays?


Recommended Posts

(I've left my question post intact for transparency; see the second for the answer.)

I've had cargo bays on my mind for a little while now, especially with adding them to deserving parts, but I've run into some snags. I think I've got the common cause, but I want to get some input from you all.

The DP Horizontal Space Bases mod has horizontal space base parts, including some cargo bays. I added cargo bay modules to the relevant parts with my hotfix patch, but while the inline cargo bay parts properly shield their contents, the leg holder does not. (I've been testing the shielding by installing a solar panel, binding it to an action group, and attempting to actuate it while the bay is closed. If the bay is shielding properly, I get the message saying they won't open while shielded.) I've also noticed the same thing with the service fuel tanks from Nertea's Near Future Technologies and the rugged probe body from Dr. Jet's Chop Shop (which does not come with ModuleCargoBay, but I've been trying to add it).

The common factor seems to be that none of these parts have hollow interiors. I've tried adding extra internal nodes (in the same place as the outer nodes, but in the opposite direction, just like the hollow Mk2 and Mk3 cargo bays have) to give to the ModuleCargoBay, and also tried defining lookupCenter, and while the initial results were promising (a part attached to the interior node of the FL-T6000 was shielded, having a zero/unchanging drag vector when the door was closed), there's still something missing (a solar panel attached to that part still opened when the door was closed). Is it the extra interior colliders that KSP doesn't like, or is there something else at work?

Edited by Kerbas_ad_astra
Link to comment
Share on other sites

To answer my own question after further study, yes, the interior colliders are causing problems. The issue is that ModuleCargoBay seems to work by raycasting from a central point. When the rays hit a part (other than the service bay itself), the part is protected, but when the rays hit a collider of the service bay part, they stop. (Many thanks to Starwaster for showing this to me.) When the default center of a part (0,0,0) is inside a collider, the rays are all trapped by the central structure and nothing gets protected. The solution is to define multiple ModuleCargoBays with different lookupCenters in each hollow space of the service bay. For some examples, check out my hotfix patches for the service tanks from Nertea's Near Future Spacecraft, the landing leg container from DP Horizontal Bases, and the rugged rover from Dr. Jet's Chop Shop.

Edited by Kerbas_ad_astra
Added link to Dr. Jet's Chop Shop hotfix.
Link to comment
Share on other sites

Sure -- you were explaining why the Zero-Point fairings were protecting stuff that fell outside of their visual (but non-colliding) boundaries. However, your post gave me an epiphany, and I realized that the problem I was having with these parts is sort of the opposite: the collider in the interior was getting in the way and stopping the part from protecting anything. (In fact, this was probably also the issue I had before defining the lookupCenter in the ZPIF config -- 0,0,0 falls inside the base, which is a collider, so the rays were trapped and nothing got protected.)

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