Jump to content

[SOLVED] Ladder animations


Recommended Posts

Quick question-- Is there anything special I need to do to make a retractable/deployable ladder?

I created one as a normal animated part, but I see that the stock ladders use a ladder-specific part module that seems to reference two animations. I created mine with just one animation, and called it "Retract" like the stock examples, and that apparently isn't good enough. The ladder retraction animation plays while placing the part in the VAB, and there's no context menu option to re-deploy it.

For now I left the "ladderAnimationRootName" value alone for that first test, and I have a "ladder" part trigger collider named "colliderLadderClimber".

Stock ladder example:


MODULE
{
name = RetractableLadder
ladderAnimationRootName = Telescopic ladder
ladderColliderName = ladderCollider
ladderRetractAnimationName = Retract
}

My ladder config:


MODULE
{
name = RetractableLadder
ladderAnimationRootName = Telescopic ladder
ladderColliderName = colliderLadderClimber
ladderRetractAnimationName = Retract
}

Maybe it would work fine with just ModuleAnimateGeneric, but I wanted to try it the stock way.

Edited by NecroBones
Link to comment
Share on other sites

  • 9 months later...

 

There are some tutorials out there, but they kinda left out the bits about the config module I was talking about above. Basically you just create a part with a normal animation, and in Unity make a capsule collider that sits in front of the ladder, which will function as the actual space that the kerbal climbs through. This capsule collider needs to be on the "part triggers" layer, and use the "Ladder" tag, otherwise there's nothing special about it. This collider can have a radius around 0.25, and whatever length it needs to be to cover the length of the entire ladder, and even stick off the ends a little to help with kerbals clibing onto another ladder if there is one on the vehicle. Make one edge of this collider overlap the visible surface of the ladder, but otherwise it should be out in front of it. You can test in game and adjust later to get the distance right.

 

Then that part module just needs a few settings:

 

ladderAnimationRootName is the name of the transform that is the root object for the ladder.

ladderColliderName is simply the name of that capsule collider that is a "part trigger".

ladderRetractAnimationName is the name you gave to the deployment animation.

 

And that's basically it. :)

 

Link to comment
Share on other sites

8 hours ago, jumpzakjump said:

Thanks so much! I'll try and get this working now, there is very little documentation for that part module ^_^

Does the root object have to be an empty transform or can it be an actual object?

 

What I did was use the name of the top transform that was imported from Blender, which had the animation associated with it. That seemed to work. :)

 

 

Link to comment
Share on other sites

  • 3 months later...

Not to drag up a post several months old but... I gave up.

Had everything just the way it's supposed to be, the model would load... and yet ANOTHER DRAG CUBE ISSUE!

KSP kept giving errors that it couldn't create a drag cube for the ladder and sure enough, in the part database, the drag cube was empty.

Swittched to ModuleAnimateGeneric... Kerbals are now scampering about my ladder.

Drag Cubes... omg.  How many drag cubes does a ladder really need????  Answer. ONE!

(and I was even able to successfully animate the size of the ladder collider which is apparently a no no.)

Edited by Fengist
Link to comment
Share on other sites

On 8/3/2016 at 3:23 PM, CobaltWolf said:

Do you have to use the ladder module? If my LEM descent stage is going to integrate legs, then it's already going to have way too many modules on it.

 

You mean the "RetractableLadder" module? Only if it's deployed via animation. If the ladder is static, then you won't need that module.

 

Link to comment
Share on other sites

28 minutes ago, NecroBones said:

 

You mean the "RetractableLadder" module? Only if it's deployed via animation. If the ladder is static, then you won't need that module.

 

... What if its attached to a landing leg, and the whole thing needs to animate together?

Link to comment
Share on other sites

2 minutes ago, CobaltWolf said:

... What if its attached to a landing leg, and the whole thing needs to animate together?

 

Dunno, I've never tried it. But I think you're probably fine to leave the module off. It's just that it won't activate and deactivate via the animation, so Kerbals will still be able to grab it if they can get to it, even when it's stowed. The only possible caveat I can think of is if KSP has a problem with animated ladder colliders that are moved by something other than that retraction module. I guess you'd just have to try it and see if it works.

 

 

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