Jump to content

1.1+ Landing gear and strut variables


GoSlash27

Recommended Posts

This is what I've worked out/ learned from debugging the stock parts and researching Unity5 wheel collider. Some of it may be incorrect and some of it is a mystery to me, so please help fill in the gaps!

moduleWheelBase

radius:(x) the radius of the collider wheel in meters

center: (x,y,z) The cartesian offset of the forces imparted to the wheel from the bottom of the wheel in meters. Set by default to 0,0,0; the bottom center of the wheel.

mass: (x) I'm not sure about this one, but I believe it's the sprung mass of the suspension before KSP scales it to real life. Increasing this allows you to use higher spring rates without jittering.

groundHeightOffset: (x) I'm not sure what this is about, but I think it's the offset between physics enabled ground height vs physics disabled (such as during time warp or gear retraction). I've had no luck so far playing with it.

frictionSharpness: I *think* this is how far the grip falls off from peak once maximum cornering is exceeded. Not really sure, though.

moduleWheelSuspension:

suspensionDistance: (x), meters. the travel distance of the suspension from fully extended to fully compressed. Altering this must be compensated for by suspensionOffset. Small suspension distances will require very high spring ratios, which may lead to skittering and oscillations.

suspensionOffset: (x), meters. An adjustment between the visual wheel and collision wheel. Negative raises the visual wheel.

targetPosition: (0-1). The amount of compression (0 fully extended, 1 fully compressed) of the suspension *as drawn*. This allows you to adjust where the suspensionDistance lives. Changing this will have to be compensated for with suspensionOffset.

springRatio: (x). Units unknown, but I suspect it's the ratio of the spring force in N/m to the mass provided in moduleWheelBase. High spring ratio tightens the suspension and increases the resonant frequency of the spring/mass system. Too high spring ratio causes terrain collisions and skittering, especially when lightly loaded.

damperRatio: (0-1) The ratio of drag imparted by the damper to the velocity of displacement. 0 is completely undamped, while 1 is critically damped. Exceeding 1 will cause forces greater than the original displacing force, leading to oscillations and bizarre behavior.

300px-Damping_1.svg.png

I like to use .6. It's just high enough to damp out oscillations, and low enough to allow the spring to absorb impacts smoothly.

boostRatio: I dunno, and I'd really like to. This affects the suspension. I've had good luck with simply commenting it out...

 

So... Unity takes all of this info, and figures out a spring rate and damper that will fulfill these requirements. Then KSP takes that and scales it appropriately to the load of the actual vehicle. The end result is that struts and landing gear will ride at the same height regardless of load... but they will not act the same. light loads and tight springs is a recipe for Kraken bait.

One other thing. For struts:

ModuleWheelDeployment

TsubSys (0-1) : when the wheelCollider becomes active during wheel/leg deployment. 0 is start of deploy animation; 1 is end. 

 

 So that's all I've got at the moment. Please help fill in the gaps and correct anything I've got wrong!

Best,
-Slashy

 

 

 

 

 

Edited by GoSlash27
Link to comment
Share on other sites

Thank you, Slashy!

This is amazing work.  There's some serious complexity in the system.  No wonder tuning the wheels and landing gear has been so difficult.

Kudos on getting specifically mentioned in the 1.1.1 changelog, as well.

Happy landings!

Link to comment
Share on other sites

Starhawk,

 Thanks for the kudos, but the original batch of adjustments for 1.1.1 was a terrible kludge IMO. I loosened the suspensions way too much in the process, turning early planes into lumberwagons.

 Now that we have more rigid mountings, I was able to return to near- 1.0 suspension stiffness without jittering.

Best,
-Slashy

 

Link to comment
Share on other sites

These settings don't apply 100% to KSP since KSP implemented a 3rd party wheel system from VPP. Unity docs describe basic PhysX wheel collider.

TsubSys determins when the wheelCollider becomes active during wheel/leg deployment. 0 is start of deploy animation; 1 is end. 

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