Jump to content

How to make a hollow collider?


Sharpy

Recommended Posts

How to make a hollow collider, like a cargo bay?

If my collider is 'convex', it won't allow putting stuff inside. If I combine multiple colliders, it kinda works except parts can be surface-attached only to the first of them. What should I do if I want to make, say, a hollow tube?

Link to comment
Share on other sites

1 hour ago, CobaltWolf said:

What do you mean they can only be attached to the first? I don't believe I've had that experience. You're on the right track with having multiple convex colliders.

Precisely what I'm saying, the top-most one appearing on the list of elements in Unity.

Say, I did this:

3yjP3mz.png

Simple two box colliders with free space in between. It behaves correctly when "launched" but in VAB it behaves pretty much as if the part only had one of these two colliders. I can't grab the part by the bottom collider, I can't attach anything to it, I can't rightclick on it - also, can't rightclick on it after launch, even though the cube will roll like a cube, both colliders interacting with the ground.

 

edit: clarifying "bottom" - appearing on the bottom in Inspector; the one with Z:0.09. If I reorder them, the other one will become inactive.

Edited by Sharpy
Link to comment
Share on other sites

I have a part I made with numerous box colliders for a hollow part and am able to surface attach and grab by more than just the first collider. The only thing I see different with your setup is the Hierarchy - mine was:

Empty game object

     - Mesh

     - collider 1

     - collider 2

     ....

     - collider N

Not sure if the above is clear - what I'm saying is that the colliders were on the same level as the mesh - not child objects.

Link to comment
Share on other sites

17 hours ago, wasml said:

I have a part I made with numerous box colliders for a hollow part and am able to surface attach and grab by more than just the first collider. The only thing I see different with your setup is the Hierarchy - mine was:

Empty game object

     - Mesh

     - collider 1

     - collider 2

     ....

     - collider N

Not sure if the above is clear - what I'm saying is that the colliders were on the same level as the mesh - not child objects.

i agree - its the correct way to solve the problem.

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