Jump to content

Can somebody explain me wheels torque settings ?


Recommended Posts

To speed up wheels I edit the cfg file, I just increase the numbers and test them, not a clue about what these values stand for... :wacko:

HbfAN2U.png

Can someone explain these values to me please ? :unsure:

Edited by Triop
Link to comment
Share on other sites

It looks more daunting than it actually is, once you know what you are actually looking at. The name "torqueCurve" already implies it: you are looking at a curve. Specifically, at something Unity calls a "floatcurve". KSP's config files are chock full of them, you see them nearly everywhere.

Now, to draw a curve, you need several points, each with two values: an X coordinate, and a Y coordinate. The floatcurve we see here has four values in each "key" (a point on the curve). The first two are the aforementioned coordinates, and the last two are so-called "tangents". They are optional, and simply describe mathematically how the curve... well, curves around the point. After all, the curve doesn't only exist at each point; it is interpolated seamlessly between those points. And sometimes that interpolation doesn't give you exactly the shape you want, so you use tangents to tweak it. But, for now, we'll ignore the tangents, and focus on the coordinates.

            X      Y
Point 1     0     2.0
Point 2    10     1.4
Point 3    52     0.5
Point 4    58     0.0

Now, what each of those coordinates mean depends on the Module (the block of code implementing the game mechanic inquestion). So you have to see if you can match them to anything.

For example, the X coordinate looks very suspiciously specific. It starts at 0 and tops out at 58. Why 58, of all possible numbers? Well, in the same config file, we can also see "wheelSpeedMax = 59". Aha! The X coordinate in this curve appears to be the wheel speed, and its unit is most likely going to be meters per second. So this curve describes how the wheel behavior changes as its speed increases from zero to (near) maximum.

Next, what is this speed being put in relation to? Well, a good first guess is that it's a multiplier of something. Many floatcurves have multipliers as their Y coordinate, to denote percentage efficiency during changing operating regimes. And since the curve is named "torqueCurve", it could be multiplying the wheel torque depending on speed. But, looking through the config file of the TR-2L wheel, there is no such thing as a general field that says "this wheel has X base torque" which could be multiplied. Instead, we find a field reading "maxBrakeTorque = 3". Curious, that's a pretty low number. Just as low as the Y coordinates in the curve itself. Turns out that wheel torque is measured in kilonewtonmeters (kNm), and having 2 or 3 of that is actually a very respectable number. So, the Y coordinate of torqueCurve appears to indeed directly specify wheel torque, measured in kNm.

Meaning: at standstill, the wheel will output up to 2.0 kNm of torque. When driving at 10 m/s, it will deliver 1.4 kNm. By the time you hit 52 m/s, the output will have fallen to 0.5 kNm, and then drops sharply to zero just a few meters per second more than that.

In order to speed up the wheel, you will have to do two things. First, increase wheelSpeedMax. Second, increase the X coordinates in torqueCurve to match the new maximum speed. Try to maintain the relation between the values' magnitudes as much as you can, because otherwise your curve may take on a weird shape (what with the tangents trying to force the curve into a specific shape but being based on the default values).

However, if you increase the speed a lot, you may not have enough torque to actually reach that speed. In that case, you would need to increase the Y coordinates of torqueCurve as well. Again, try to maintain similar magnitudes.

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