Jump to content

Weird issue with ladders and airlocks


Recommended Posts

So, I'm working on this inline cockpits mod, some may have seen the development thread, but I'm having the weirdest issue, and I'm hoping someone can help. I got the airlock to work for kerbals to exit, but it's not clickable and Kerbals can't grab the ladder or board the cockpit again after they exit. I've done another cockpit before and the airlock and ladder for the first I made are wworking perfectly. I believe I've don everything the same, but I'm clearly missing something, I just don't know what, exactly. I've set up the capsule colliders intersecting mildly with the main mesh collider, I ticked the "Is trigger" box, I've tagged each collider with the corresponding "Airlock" and "Ladder" tag, and I've set them to layer #21 called "Part Triggers". I've checked the wiki documentation, and other threads covering this and I can't find what else do I need to do. The local Y is pointing in the direction the Kerbals are supposed to climb up and the local Z is pointing in the direction the Kerbals are supposed to be facing. Any ideas on what else did I miss? Any help greatly appreciated.

Link to post
Share on other sites
So, I'm working on this inline cockpits mod, some may have seen the development thread, but I'm having the weirdest issue, and I'm hoping someone can help. I got the airlock to work for kerbals to exit, but it's not clickable and Kerbals can't grab the ladder or board the cockpit again after they exit. I've done another cockpit before and the airlock and ladder for the first I made are wworking perfectly. I believe I've don everything the same, but I'm clearly missing something, I just don't know what, exactly. I've set up the capsule colliders intersecting mildly with the main mesh collider, I ticked the "Is trigger" box, I've tagged each collider with the corresponding "Airlock" and "Ladder" tag, and I've set them to layer #21 called "Part Triggers". I've checked the wiki documentation, and other threads covering this and I can't find what else do I need to do. The local Y is pointing in the direction the Kerbals are supposed to climb up and the local Z is pointing in the direction the Kerbals are supposed to be facing. Any ideas on what else did I miss? Any help greatly appreciated.

You need to make sure the airlock collider is larger than the ladder collider. If the raycast hits the ladder collider before the airlock, no mouse-over action will be available. Even a very minor amount of oversize should work (few cm).

Link to post
Share on other sites
You need to make sure the airlock collider is larger than the ladder collider. If the raycast hits the ladder collider before the airlock, no mouse-over action will be available. Even a very minor amount of oversize should work (few cm).

It's smaller actually... They intersect a bit, but on the side opposite to where the raycast is supposed to hit, so the raycast should definitely hit the airlock collider first. But thanks in any case, I'll try making it larger anyway, maybe it's not big enough, hope it's that...

Link to post
Share on other sites

There are three things that need to be done to make ladders and airlocks work:

  1. Is Is Trigger checked for the collider?
  2. Is the Tag set to Airlock/Ladder?
  3. Is the Layer set to Part Triggers?

Hope this helps:wink:

Link to post
Share on other sites
There are three things that need to be done to make ladders and airlocks work:

  1. Is Is Trigger checked for the collider?
  2. Is the Tag set to Airlock/Ladder?
  3. Is the Layer set to Part Triggers?

Hope this helps:wink:

All you did was read the title and make your post right? You didn't even read the OP. SMH lol. Very helpful

Link to post
Share on other sites

i just read until "[...] Kerbals can't grab the ladder or board the cockpit again after they exit" and thought that i had exactly the same issues when i forgot one of mentioned tasks. I should have read till the end, my bad, sorry.

But do you really think this is a reason to get straightaway rude?

I would have asked if you are using a primitive or a mesh-collider for the airlocks/ladders. Because e.g the mesh-colliders need to be set to convex but well....

Link to post
Share on other sites
Any news? I am waiting for you to fix this before DL the mod as I don't want part that have functionality issues.

I tried everything in those threads I Hadn't already tried, but still no luck. I swear I don't know what the hell is going on

Link to post
Share on other sites
IIRC I had a similar problem because my Part Triggers layer wasn't on the correct numbered layer. I want to say layer 21, but that's off the top of my head. If that's not it, can you post a pic of the setup in unity?

Yeah, I'll post a pic. I'm pretty sure the layers and tags are as they're should be, but there has to be something I'm not seeing... And you are correct, it is layer 21

Link to post
Share on other sites
IIRC I had a similar problem because my Part Triggers layer wasn't on the correct numbered layer. I want to say layer 21, but that's off the top of my head. If that's not it, can you post a pic of the setup in unity?

Here, I think it shows all the necessaty bits of the unity setup

Javascript is disabled. View full album

- - - Updated - - -

HOLY MOTHER OF "$%=)("#$?#"()$!!! I have just realized I've been reading my setup wrong this whole time! That thing is in layer 20 and not 21. Sorry you guys, mild dyslexia (like, actually)

Link to post
Share on other sites
Here, I think it shows all the necessaty bits of the unity setup

http://imgur.com/a/abu5R

- - - Updated - - -

HOLY MOTHER OF "$%=)("#$?#"()$!!! I have just realized I've been reading my setup wrong this whole time! That thing is in layer 20 and not 21. Sorry you guys, mild dyslexia (like, actually)

Yeah I was looking over it like I am pretty sure that says layer 20... LOL :D :D At least it was simple and not something crazy. :confused:

Link to post
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...