Jump to content

0.15 Landing Gear


mossman

Recommended Posts

The cfg file for the new landing gear that made it in the 0.15 update has no option for adjusting braking torque. However, the way I understand how the cfg files work, they simply modify any existing public variable in the part\'s respective code. How could I obtain the specific variable name to modify, however? I\'ve no experience at all with decompiling code, which makes that particular avenue somewhat daunting for me. Does anyone know the name for that specific (braking torque) value?

Link to comment
Share on other sites

Yes it does:

breakingForce = 50

breakingTorque = 50

C7 said he wanted us to be able to easily modify any parts, so he made this ;)

EDIT (\'cause there\'s no point in posting): My bad, didn\'t read correctly >.<

Link to comment
Share on other sites

Yes it does:

breakingForce = 50

breakingTorque = 50

C7 said he wanted us to be able to easily modify any parts, so he made this ;)

There\'s a different between \'break\' and \'brake\'. Those values modify what it takes to destroy the part.

Link to comment
Share on other sites

The line is currently missing, C7 is going to add it, see here.

If we knew the missing line we could add it now ourselves.

Yes, I know, that\'s what the basis for the OP here is. What I\'m asking here is if anyone\'s decompiled the code and looked into seeing what the syntax for the braking-force variable is.

Link to comment
Share on other sites

What values did you try? Tosh\'s cart uses 2.5 and even that seems too much.

The values I tried are irrelevant, because the ones I did try had no effect on how the wheels behaved, thus brakeTorque is not the correct name for the variable (it didn\'t work).

Link to comment
Share on other sites

Ask and ye shall receive ;)

Anything in the public namespace is able to overridden in the part.cfg files. So you can completely adjust the handling of the gear, down to frictions and braking forces. So have fun. Just make sure you exactly match case, or it will not work. brake != Brake

  

public string gearObject = 'DamperCylinder';
public string wheelObject = 'Wheel';
public string suspensionObject = 'ShockCylinder';

public float animationTime = 0;
public float animationSpeed = 0;
public float restitutionTorque = 2.5f;
public float suspensionExtensionLimit = -0.3512708f;
public float suspensionCompressionLimit = -0.1737663f;
public float angleOffset = 90f;
public Vector3 suspensionOffset;

public Vector3 angleOffsetAxis = new Vector3(1f, 0f, 0f);

public Transform wheelPivot;
public Transform gearPivot;
public Transform suspensionPivot;

public Rigidbody rigidbodyTest;

public Vector3 wheelRotationAxis = new Vector3(0f, 0f, 1f);

public float stowedDragMin = 0.1f;
public float stowedDragMax = 0.1f;

public float deployedDragMin = 0.7f;
public float deployedDragMax = 0.7f;

// Wheel Traction Behavior / Friction Controls (f) forward, and (s) sideways values
public float fExteremumSlip = 1.0f;
public float fExteremumValue = 15000f;
public float fAsymptoteSlip = 2.0f;
public float fAsymptoteValue = 7000f;
public float fStiffness = 0.11f;

public float sExteremumSlip = 1.0f;
public float sExteremumValue = 10000f;
public float sAsymptoteSlip = 2.0f;
public float sAsymptoteValue = 2000f;
public float sStiffness = 0.01f;

public float retractedTime = 1f;
public float deployedTime = 0f;

public string brakeKey = 'b'; // key that controls brakes on the gear
public GearStates gearState = GearStates.DEPLOYED; // starting state of the gear
public GameObject Gear;

public float wheelRadius = 0.18f; // Wheel radius
public float suspensionDistance = 0.7f; // suspension distance
public float suspensionSpring = 1000f; // suspension spring rate
public float suspensionDamper = 25000f; // suspension damper
public float suspensionTarget = 0f; // suspension target

public float BrakeTorque = 100; //Landing gear brake Torque

public float MaximumSteeringAngle = 2; // Steering amount
public float WheelMass = 1.0f; // Wheel mass


Link to comment
Share on other sites

Thanks :) Just one thing I\'d like to know though, is there a way to make the brakes only activate on rear mounted wheels?

Nosewheels aren\'t known for having brakes on airplanes, mainly because they can\'t handle the weight.

Link to comment
Share on other sites

Very nice, C7, but I don\'t understand the braketorque and the 'extremum', 'asymptote' etc. values (all the traction block, actually)

I was expecting just the three friction coefficients (static, dynamic and rolling) ;)

Link to comment
Share on other sites

Zero BrakeTorque front wheels does work, cool, makes it hard to share the designs that use it though.

But another thing I just found which I don\'t think has come up before, is that the wheels still work fully when retracted, I wanted a smaller wheel for the tails of aircraft and now it seems I can use the new stock wheels for this, all I have to do is retract the ones on the tail :)

Thanks C7.

Ps, is there any way to make two rudders/ailerons split to act as airbrakes?

Link to comment
Share on other sites

Sorry for the confusion mossman, I misread your OP >.<

And thank you C7 for these! So we just have to copy/paste those lines in the part.cfg?

And a little question that goes along the same idea: how do I setup the part.cfg to make a part multi-module? I guess that\'s what Mu explained in one of his posts, but I\'m not really sure.

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