Jump to content

Any way to make radial attachment fit more closely to an irregular shape?


Recommended Posts

So, I'm back on the KSP modding scene after years of inactivity, and I'm putting my newly acquired Blender knowledge to use in making what's essentially going to be a handy probe core. One issue I'm facing, however, is that I want the player to be able to attach things to the surface, but the surface of the part is irregular. KSP doesn't seem to like this. I'm attaching a screenshot with a radial solar panel just to show you what I mean. As you can see, the solar panel is just kind of awkwardly floating despite being "attached". My question is: is there a way to make the radial attachment fit more closely to the surface of the part?

https://i.imgur.com/J5vW2eD.png

Link to comment
Share on other sites

Hi the problem is not the attaching part,  you can only attach  to a collider , and by the looks of it that cylinder part has a unity applied convex mesh collider ,  and that is what the solar panel is attaching to.  This fills out any concave areas, and leaves parts hovering above the apparent model surface. 

The solution other than using the offset tool to make it look nicer,  is to make a better collider for the cylinder part, as anything you do to change the mounting of the solar panel, which is correct as it is, will make it a poor for for every other part

Link to comment
Share on other sites

2 minutes ago, SpannerMonkey(smce) said:

Hi the problem is not the attaching part,  you can only attach  to a collider , and by the looks of it that cylinder part has a unity applied convex mesh collider ,  and that is what the solar panel is attaching to.  This fills out any concave areas, and leaves parts hovering above the apparent model surface. 

The solution other than using the offset tool to make it look nicer,  is to make a better collider for the cylinder part, as anything you do to change the mounting of the solar panel, which is correct as it is, will make it a poor for for every other part

Ah, I thought it might be that. I read on a tutorial site that mesh colliders have to be concave for them to work in KSP, but would it work fine if it were convex?

Link to comment
Share on other sites

Mesh colliders in KSP are convex only, not concave

Definition-of-concave-versus-convex-1.pn

A convex collider applied to the shape on the left will result in the hollowed area being occluded and any part attached there would hover.

I would suggest  in stead of a single convex mesh collider that you have instead  3 simple cylinder colliders, 1 for the central cylinder, 1 for the top tapered extrusion and 1 more for the mid ring. It's still not ideal though and you'll still have to some extent, though not as bad, some areas on which parts will float , and some, where parts will appear slightly sunken in to the surface.

Edited by SpannerMonkey(smce)
Link to comment
Share on other sites

4 minutes ago, SpannerMonkey(smce) said:

Mesh colliders in KSP are convex only, not concave

Definition-of-concave-versus-convex-1.pn

A convex collider applied to the shape on the left will result in the hollowed area being occluded and any part attached there would hover.

I would suggest  in stead of a single convex mesh collider that you have instead  3 simple cylinder colliders, 1 for the central cylinder, 1 for the top tapered extrusion and 1 more for the mid ring. It's still not ideal though and you'll still have to some extent, though not as bad, some areas on which parts will float , and some, where parts will appear slightly sunken in to the surface.

Yeah, my bad, got my sentence mixed up haha! I'll try your advice and play around with multiple colliders. Thanks!

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