Jump to content

Moving Collider Animation Issue


Recommended Posts

So, I have created this landing leg part (Just module animate generic though).

But, I have run into a few problems.

On animate, the legs swing out and extend.

51297fcc75.jpg

046e185519.jpg

Trouble is, if you exit the VAB with the legs deployed, it spawns on the bottom of the main

collider, and not the legs.

45365faba5.jpg

Also, when touching down, there is a fair amount of wobble on the node the fuel tank is attached to.

d066a87c7e.jpg

So I would ask:

1. Any way to fix this?

2. Less preferable, can I disable animation toggle in VAB?

Many thanks :)

Edit:

A few of these issues are solved by switching to the old Module landing leg (But probably shouldn't use this?)

4c6ff9f4c7.jpg

I suppose the best thing would be to implement "proper" landing legs, but, I don't really know how (BahumatoD's tutorial is good, but I cannot quite follow it).

Edited by Beale
Link to comment
Share on other sites

You're best off using the landing leg module, it looks like KSP doesn't take into account the leg extension and doesn't allow clearance.

It's really not hard to set up the proper module and there is a thread NecroBones started recently which goes through a lot of troubleshooting stuff. Watch my wheel modding YouTube too, as most is relevant to landing legs. Good luck and shout if you need a hand.

Link to comment
Share on other sites

You're best off using the landing leg module, it looks like KSP doesn't take into account the leg extension and doesn't allow clearance.

It's really not hard to set up the proper module and there is a thread NecroBones started recently which goes through a lot of troubleshooting stuff. Watch my wheel modding YouTube too, as most is relevant to landing legs. Good luck and shout if you need a hand.

Well, perhaps I will have to take the plunge :D

May I ask one thing though: Will landing leg module work when all four legs are the same part?

Link to comment
Share on other sites

ModuleLandingLeg only accepts 1 wheelCollider. you'd need to make a single leg and attach it 4 times.

might wanna take a look at RoverDude's lander frame. same setup as yours. I don't recall it having the issues you are experiencing though I could be wrong. someone was dealing with same problems you have now, not sure if that was resolved.

Link to comment
Share on other sites

I've seen people try that and struggle with multiple legs on a part but never succeed, so I think no. Having said that, I've not tried it myself...
ModuleLandingLeg only accepts 1 wheelCollider. you'd need to make a single leg and attach it 4 times.

might wanna take a look at RoverDude's lander frame. same setup as yours. I don't recall it having the issues you are experiencing though I could be wrong. someone was dealing with same problems you have now, not sure if that was resolved.

Hiya!

Many thanks for the info, it does not bode well for true suspension.

Do you have a link to RoverDude's frame? Is it in MKS? Not sure where to look.

Many thanks :)

Link to comment
Share on other sites

it might be in MKS. it was in Karbonite last I remember.

here's the other thread, now that I looked through it... the setup should work instead of dropping through the launchpad, I got a simple version of his part working as intended. maybe that thread can offer some ideas.

http://forum.kerbalspaceprogram.com/threads/100574-Help-with-jumping-parts-with-colliders

Edited by nli2work
Link to comment
Share on other sites

it might be in MKS. it was in Karbonite last I remember.

the other person was/is working on a part for MKS addon IIRC.

Found it, it's in Karbonite, thanks!

I'll take a look at how it is set up.

Edit: The USI one uses a custom animation module to do what it does.

Looks like I will stick with the old landing gear setup (Which will hopefully not be deprecated).

The USI exits the VAB correctly, but still suffers very much the same wobbling properties (It only happens on fairly hard landings, so what the heck, it's not a huge problem).

I've gotten around the problem by disabling animation tweak in the VAB, so you will always exit "Legs folded".

Thanks for all the help guys :)

Edited by Beale
Link to comment
Share on other sites

If you're feeling really brave you can try setting it up with my KF plugin at some point - that'll allow you to have all the legs on one part. It's complex (but very flexible), so I'd suggest running through the Squad way of doing things first, and by the time you're ready to move on (should you wish to), I'll hopefully have it documented.

Link to comment
Share on other sites

If you're feeling really brave you can try setting it up with my KF plugin at some point - that'll allow you to have all the legs on one part. It's complex (but very flexible), so I'd suggest running through the Squad way of doing things first, and by the time you're ready to move on (should you wish to), I'll hopefully have it documented.

What is the KF way? I made a four toed landing foot for the IR Rework that has the reverse issue of this (starts in the air then falls down), when using the generic anim module. Would be great if it had a bit of flexibility to it.

Link to comment
Share on other sites

What is the KF way? I made a four toed landing foot for the IR Rework that has the reverse issue of this (starts in the air then falls down), when using the generic anim module. Would be great if it had a bit of flexibility to it.

Kerbal Foundries It's a plugin focused on Wheels and stuff (Or land movement in general I suppose) and offers a much nicer experience than Squad's wheels. :)

Link to comment
Share on other sites

Kerbal Foundries It's a plugin focused on Wheels and stuff (Or land movement in general I suppose) and offers a much nicer experience than Squad's wheels. :)

Oh yes I know. Me and lo-fi have had extensive conversations about wheel implementations :). I was meaning more specifically what's the way of using KF for landing legs.

Link to comment
Share on other sites

What is the KF way? I made a four toed landing foot for the IR Rework that has the reverse issue of this (starts in the air then falls down), when using the generic anim module. Would be great if it had a bit of flexibility to it.

I've almost finished building generic modules that are flexible enough to drive tracks, wheels, landing legs, landing gear or just about anything you can do with wheel colliders - even a bulldozer blade! The presence of the "Bounds" collider helps with this sort of issue, as it gives KSP a clue where to place the vessel above the ground, which is helpful. The KF modules are built to deal with multiple wheel colldiers, suspension and wheel meshes (needed for tracks), so setting multiple legs up is not an issue.

Kerbal Foundries It's a plugin focused on Wheels and stuff (Or land movement in general I suppose) and offers a much nicer experience than Squad's wheels. :)

Cheers :)

Oh yes I know. Me and lo-fi have had extensive conversations about wheel implementations :). I was meaning more specifically what's the way of using KF for landing legs.

The two modules you need are KF ModuleWheel, which you'll want to configure with zero torque and steering curve values, along with a high rollingResistance value (using the wheel colliders for suspension simulation, not as wheels). This module handles setting up the colliders, destroying the Bounds object at start of flight, animations and just about everything control related. KFWheel handles reading suspension movement, steering, and wheel rotation, all of which you can turn off if you don't want to use it. In this case, just enable the suspension movement, set up a module for each of the feet and watch the fun. Animation might be the only area it could still do with some work, but that's not actually that hard to deal with - see nli2work's space tug and play with the variable engine retract module I built for it to see an example of funky ways you can drive an animation if needed (hint: build one and use the RCS translation keys with the engines extended and RCS turned off).

Hopefully that gives you a good overview, though I really need to document it properly! I've set up all the stock wheels to use the KF plugin (will release as MM patch), so maybe I ought to do one of the stock legs as an example?

Link to comment
Share on other sites

lo-fi, I'd love to see an example. Landing gear and landing legs are my two least favorite bits to mod. I'm surprised my alt and f12 keys still work from how many times I've reloaded while trying to make something that should be simple work! :)

As to the original post- I tried a lot of things for my Landertek undercarriage with legs - I tried defining the whole undercarriage as the foot and putting the suspension at the very top, where it attaches to the pod above it... I tried a single suspension parent that controlled all 4 feet with a wheel collider in the middle of the lander (and box colliders on every foot) - which showed some promise.... but in the end I decided to skip suspension and wheel colliders. I made the crash tolerance pretty high and designed a mesh that looked okay without suspension. I still included a module landing leg, but the only bits I'm using are:

MODULE

{

name = ModuleLandingLeg

animationName = Scene

impactTolerance = 3000

}

And I don't know that the impactTolerance is doing anything without the wheel collider. But by calling the animation with the module, it automatically gets added to the action group correctly!

To solve the 'starting underground' problem, I just had to add box colliders to both the feet and the legs. There seems to be some magic amount of 'collider volume' that is enough to make KSP position it correctly. Just putting colliders on the feet wasn't sufficient. This is where the larger 'bounds' object is handy when you're working with modules that are smart enough to remove it.

I'll definitely look into KF! I had no idea it was so general purpose!

Link to comment
Share on other sites

MODULE

{

name = ModuleLandingLeg

animationName = Scene

impactTolerance = 3000

}

And I don't know that the impactTolerance is doing anything without the wheel collider. But by calling the animation with the module, it automatically gets added to the action group correctly!

That's a good idea. I may have to try that with the animation-only leg set I have in SpaceY.

Link to comment
Share on other sites

lo-fi, I'd love to see an example. Landing gear and landing legs are my two least favorite bits to mod. I'm surprised my alt and f12 keys still work from how many times I've reloaded while trying to make something that should be simple work! :)

As to the original post- I tried a lot of things for my Landertek undercarriage with legs - I tried defining the whole undercarriage as the foot and putting the suspension at the very top, where it attaches to the pod above it... I tried a single suspension parent that controlled all 4 feet with a wheel collider in the middle of the lander (and box colliders on every foot) - which showed some promise.... but in the end I decided to skip suspension and wheel colliders. I made the crash tolerance pretty high and designed a mesh that looked okay without suspension. I still included a module landing leg, but the only bits I'm using are:

MODULE

{

name = ModuleLandingLeg

animationName = Scene

impactTolerance = 3000

}

And I don't know that the impactTolerance is doing anything without the wheel collider. But by calling the animation with the module, it automatically gets added to the action group correctly!

To solve the 'starting underground' problem, I just had to add box colliders to both the feet and the legs. There seems to be some magic amount of 'collider volume' that is enough to make KSP position it correctly. Just putting colliders on the feet wasn't sufficient. This is where the larger 'bounds' object is handy when you're working with modules that are smart enough to remove it.

I'll definitely look into KF! I had no idea it was so general purpose!

Very interesting the config there, I had no idea it was possible to use a "dumb" leg in the suspension leg module. I'll have to try this! (Though obviously full suspension is ideal).

Oh yes I know. Me and lo-fi have had extensive conversations about wheel implementations :). I was meaning more specifically what's the way of using KF for landing legs.
I've almost finished building generic modules that are flexible enough to drive tracks, wheels, landing legs, landing gear or just about anything you can do with wheel colliders - even a bulldozer blade! The presence of the "Bounds" collider helps with this sort of issue, as it gives KSP a clue where to place the vessel above the ground, which is helpful. The KF modules are built to deal with multiple wheel colldiers, suspension and wheel meshes (needed for tracks), so setting multiple legs up is not an issue.

Cheers :)

The two modules you need are KF ModuleWheel, which you'll want to configure with zero torque and steering curve values, along with a high rollingResistance value (using the wheel colliders for suspension simulation, not as wheels). This module handles setting up the colliders, destroying the Bounds object at start of flight, animations and just about everything control related. KFWheel handles reading suspension movement, steering, and wheel rotation, all of which you can turn off if you don't want to use it. In this case, just enable the suspension movement, set up a module for each of the feet and watch the fun. Animation might be the only area it could still do with some work, but that's not actually that hard to deal with - see nli2work's space tug and play with the variable engine retract module I built for it to see an example of funky ways you can drive an animation if needed (hint: build one and use the RCS translation keys with the engines extended and RCS turned off).

Hopefully that gives you a good overview, though I really need to document it properly! I've set up all the stock wheels to use the KF plugin (will release as MM patch), so maybe I ought to do one of the stock legs as an example?

Sounds incredible! For sure will look into this :)

Link to comment
Share on other sites

MODULE

{

name = ModuleLandingLeg

animationName = Scene

impactTolerance = 3000

}

And I don't know that the impactTolerance is doing anything without the wheel collider. But by calling the animation with the module, it automatically gets added to the action group correctly!

That's a good idea. I may have to try that with the animation-only leg set I have in SpaceY.
Very interesting the config there, I had no idea it was possible to use a "dumb" leg in the suspension leg module. I'll have to try this! (Though obviously full suspension is ideal).

Totally works, but I had to use a full config for it. If I made it as simple as the above, then the leg-state wasn't remembered, and the legs would teleport for un-deploying instead of animating. I ran into that while working on other legs, and it's indicative of a botched config with the wheel colliders and the like.

So I put a full config with dummy transforms for the piston/foot, and a wheelcollider, and positioned them to aim outside of the structure, in the space that the legs deploy through (to be pretty sure nothing gets attached there), and set the leg colliders to be "wheelCollidersIgnore". And now it works great.

I haven't tested whether it spawns inside the pad or not though. I'll try that.

Config:


MODULE
{
name = ModuleLandingLeg

animationName = deploy
wheelColliderName = wheelCollider
suspensionTransformName = piston
suspensionUpperLimit = 0.1
impactTolerance = 1800
suspensionSpring = 5
suspensionDamper = 1

orientFootToGround = false
landingFootName = foot
// Axis is aligned forward instead of up
alignFootUp = false
}

- - - Updated - - -

I haven't tested whether it spawns inside the pad or not though. I'll try that.

Spawned correctly too:

KSP%202015-01-15%2021-37-13-29.jpg

Link to comment
Share on other sites

I had problems with legs snapping closed instead of animating at one point... then somewhere along the development it started working on its own.. and I've still got that stripped down config. I think I'll take your advice and throw in the dummy objects just for safety though... because I'd hate for it to be one of those things that looks like it works fine right up until release!

Link to comment
Share on other sites

Do you have pictures of the unity setup you used for getting this trick working too? I'm thinking of applying it to my own part.

Edit:

Seems there's a fair demand for some worked examples.. I'll get some Unity packages and YouTubes put together once I get the next KF release out.

Do you have a link to your YouTubes? I could do with watching that wheel setup stream again.

Edited by ZodiusInfuser
Link to comment
Share on other sites

Do you have pictures of the unity setup you used for getting this trick working too? I'm thinking of applying it to my own part.

Yep, here's where the wheelCollider is. I just placed it outside one of the leg hinges, where it will just float in space. The piston/foot transforms are empty and are in the same location as the wheelcollider.

KSP%202015-01-16%2000-00-00-00.jpg

Link to comment
Share on other sites

Yep, here's where the wheelCollider is. I just placed it outside one of the leg hinges, where it will just float in space. The piston/foot transforms are empty and are in the same location as the wheelcollider.

http://www.necrobones.net/screenshots/KSP/KSP%202015-01-16%2000-00-00-00.jpg

Great way to insure against null refs when the module tries to initialize stuff that isn't there.

Do you have pictures of the unity setup you used for getting this trick working too? I'm thinking of applying it to my own part.

Edit:

Do you have a link to your YouTubes? I could do with watching that wheel setup stream again.

On mobile at the moment, but the wheel modding video is on the Kerbal Foundries YouTube channel and should be easy enough to find from there.

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