Jump to content

Ladder collision box


Recommended Posts

So I'm probably missing something simple, but I can't get ladders to work reliably. My Kerbonauts either grab and then bounce off the ladder violently, or clip badly into the base structure while climbing. I think the problem is I don't know what the part trigger box/collision box should look like in Unity (I'm pretty sure I've got the up and facing orientations correct). Does anyone have a reference for the width and depth of the collision box, and how it should/shouldn't clip into the base model? I've got airlocks working fine so it seems like I'm mostly there. Here's a pic of a failed attempt (trying skinny boxes):

http://web.mit.edu/david_c/Public/ladder-box.jpg

Thanks!

Link to comment
Share on other sites

Sure:

tW8Wt.png

ay84o.png

Don't forget that the orientation of the axis is important too, the blue axis for the ladder and airlock need to be facing inward so the Kerbal spawns facing the capsule, and green needs to be 'Up' so the Kerbal is heads up.

Link to comment
Share on other sites

Tiberion, thanks, that's exactly what I was looking for. And great work around KSP in general! :)

Unfortunately, no luck in getting my Kerbals to behave on the ladder. For hours I've been trying your exact dimensions and many variations, and they still either immediately fall off or bury their faces into the module. Also the axes are in the correct directions.

For instance:

ladder-box2.jpg

Leads to immediately falling off:

2012-10-15_00006.jpg

It's like he is being overwhelmed by the ladder clipping forces - any setting I could be missing? I was using the Unity Mesh Collider before, but switched to the Box Collider you used, but no difference as I would expect.

Link to comment
Share on other sites

Ah! I got it to work! So I saw somewhere that adjusting the Collider geometry controls could cause problems, so I set the Box Collider center to (0,0,0) and Size to (1,1,1), then used the Transform controls at the the top of the page to make a box that is more like yours, with just a little clipping. Thanks for the help! You also showed me I can delete the unneeded renderer sections from the Unity Inspector to get rid of ghosting in the VAB.

p.s. Hmm, my Kerbal did explode coming out of the airlock, but a little more clipping and he usually catches the ladder now. I think I can be happy learning a little Blender and Unity from nothing all in one day (with minor insanity produced)! :0.0:

Link to comment
Share on other sites

if he's exploding its likely the airlock collider, move it out (-Z) a little bit - as long as you leave the ladder flush so his hands will look like he's gripping the visible mesh, and the ladder and airlock intersect, then he should still detect the ladder and snap to it properly when spawning.

I was told that the mesh collider meshes that unity creates arent reliable, so switching to boxes is a good idea (of course I still use a mesh collider for the capsule, just make sure to check the convex box, but I no longer worry about making collider boxes in blender)

Edited by Tiberion
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...