Jump to content

Landing Gear issues: wheel does not rotate, suspension doesn't work


Recommended Posts

For the last days i've been trying to make a landing gear part following some tutorials here on the forum and other posts, but I'm not getting it right. I'm not sure if it's the hierarchy or the cfg.

The wheel works as it should but the mesh does not rotate and the suspension does not move; it stays frozen on what should be the most extended position whether it's flying or grounded. Can you help me figure it out?

ynfoc1detm691.png

Here's the MU. ▽sus_up is the base and ▽sus_down should follow +suspension and ▽wheel

zewr1yuc4n691.png

And heres's my CFG

Spoiler

PART{
    name = KFW-HAWKWHEL
    module = Part
    author = CarelessDoughnut
    scale = 1.0
    rescaleFactor = 1.0
    TechRequired = aviation
    entryCost = 1500
    cost = 150
    category = Ground
    subcategory = 0
    title = Fixed Landing Gear
    manufacturer = Kerbal Flightworks Company
    description = A bit Heavy, but these thinner, longer spats are quite sturdy while aerodynamic. It's basically a wing with a wheel on a side.
    attachRules = 1,1,1,1,1
    mass = 0.035
    thermalMassModifier = 4.0
    emissiveConstant = 0.95
    dragModelType = default
    maximum_drag = 0.25
    minimum_drag = 0.15
    angularDrag = 1
    maxTemp = 1000
    crashTolerance = 325
    breakingForce = 50
    breakingTorque = 50
    PhysicsSignificance = 0
    bulkheadProfiles = srf
    tags = kfw aero air aircraft free ground plane roll takeoff taxi wheel
    MODEL {
        model = KFW/PARTS/WHEELS/HAWKWHEL
        texture = Mk3Fuselage, Squad/Parts/FuelTank/mk3Fuselage/Mk3Fuselage
        texture = LandingGear, Squad/Parts/Wheel/LandingGear/LandingGear
        texture = roverwheel1, Squad/Parts/Wheel/roverWheelM1/roverwheel1
    }

    MODULE {
        name = ModuleWheelBase
        wheelColliderTransformName = wheelco
        wheelTransformName = wheel
        useNewFrictionModel = true
        wheelType = FREE
        FitWheelColliderToMesh = false
        radius = 0.591416
        center = 0,0,0
        mass = 0.020
        groundHeightOffset = 1.2
        TooltipTitle = #autoLOC_502080
        TooltipPrimaryField = #autoLOC_6004048
        frictionSharpness = 10.0
    }

    MODULE {
        name = ModuleWheelSuspension
        baseModuleIndex = 0
        suspensionTransformName = suspension
        suspensionOffset = 0
        suspensionDistance = 0.082435
        targetPosition = -0.082435
        springRatio = 144
        damperRatio = 1.0
        boostRatio = 0.6
        useAutoBoost = False
        maximumLoad = 8.0
        suppressModuleInfo = True
        useDistributedMass = true
    }

    MODULE {
        name = ModuleWheelDamage
        baseModuleIndex = 0
        stressTolerance = 2000
        impactTolerance = 1000
        deflectionMagnitude = 0.5
        deflectionSharpness = 2.0
        slipMagnitude = 1.5
        slipSharpness = 2.0
        explodeMultiplier = 1.0
    }

    MODULE {
        name = ModuleCargoPart
        packedVolume = 120
    }

    MODULE {
        name = ModuleWheelBrakes
        baseModuleIndex = 0
        maxBrakeTorque = 4
        brakeResponse = 1
        statusLightModuleIndex = 4
    }

}
@PART[KFW-HAWKWHEL]:NEEDS[TweakScale]:FOR[KFW] {
    %MODULE[TweakScale] {
        type = free
    }

}

 

 

Link to comment
Share on other sites

8 hours ago, CarelessDoughnut said:

Can you help me figure it out?

Hi. I am used to building off of the Stock colliders so your wheel collider looks wrong to me, I also don't know what modifiers you have put in there.

Based on what you appear to be going for I think you need to to look at the Stock "Gear Free" as when you remove the Steering module from it is pretty much exactly what you are trying for in having a no steering, suspension landing gear. Either open it up in your 3D program to look at how it is set up or actually use it and replace the meshes with your own and adjust the transform positions to match the size of your meshes. I have configed a version of the stock with the steering module removed and it works well. Here is a pic of it in my BforArtists set up (Fork of Blender) so you can see how it's heirachy is set up. Just compare to it's config file. Many of the actions of a wheel are completely in the config file, the transforms in the .mu simply set the origin points from which they start.         wheelTransformName = wheel, determines what gets rotated when it is moving. Note that the WheelCollider is an actual collider, not an empty axis, and that the name is the same for collider and it's collection. In yours it is different.

ocRqClR.jpg

Link to comment
Share on other sites

12 hours ago, ColdJ said:

Hi. I am used to building off of the Stock colliders so your wheel collider looks wrong to me

I made that collider from the Add Mu Collider > Sphere since i didn't see a "circle" option and thought "well, they're both round" . I did look onto the GearFree model to do mine but i tried doing it from scratch.

 

12 hours ago, ColdJ said:

I also don't know what modifiers you have put in there.

You mean the text? thats the position of the objects. I thought it could be a mistake with  suspensionOffset, suspensionDistance or targetPosition

 

Now I remade the part using  GearFree as you said, the wheel does rotate, but the two fairing parts got separated

z8pdn13glt691.png

Link to comment
Share on other sites

4 hours ago, CarelessDoughnut said:

Now I remade the part using  GearFree as you said, the wheel does rotate, but the two fairing parts got separated

You need to adjust your suspension distance, most likely only in the config file but if you can't get it together then you need to change position of transforms and size of collider in relation to your meshes. The numbers used in the config determine many things including the starting distance between the base and the section with the wheel. Try to adjust the gear in game with the UI first to get an idea of what might need to be adjusted in the config.

When you were in the space plane hangar did it look together?

There are parameters for travel and spring strength in the config. I am ignorant about exact measurements but I generally experiment till I get it how I want. Remember you can make several uniquely name configs that use the same model and have them all load at the same time so that you can try many variations to see what gets changed in one session of KSP.

Also try the wheels out on the flat grass off to the side of the runway to see if your wheels look natural on the surface, whether they look sunk in or floating. The runway is never a reliable indicator as it seems to play around with it's collider positions. You change the radius parameter in  the MODULE        name = ModuleWheelBase to change how high it seems to sit.

Edited by ColdJ
Link to comment
Share on other sites

2 hours ago, ColdJ said:

I found a page that may help

Exactly that post i saw like once and then lost it, but it's the one i understood the most.

3 hours ago, ColdJ said:

When you were in the space plane hangar did it look together?

Yes, in the "extended" position.

3 hours ago, ColdJ said:

Remember you can make several uniquely name configs

Oh that's a cool trick; i was closing and reopening KSP over deleting a minus.:D

Link to comment
Share on other sites

  • 3 weeks later...
On 7/7/2022 at 9:48 AM, CarelessDoughnut said:

Thank you ColdJ I got it working by isolating the suspension values, trying them one by one. Now it's working fine... except its clipping on the SPH. I'm guessing the parts in the editor imitate the position on the  .mu?

Luckily I saw this after you put a post in the modeling section. Make sure you tag a member properly or quote them if you want them to see your post and respond. To tag you need to start with the @      symbol and then type their name, a list will appear for you to choose the correct member from.

The world centre in the blender workspace is considered the centre of the .mu model you create. So when a part is loaded into the SPH it will be offset from the centre by how it is offset in the blender workspace. Clipping in the SPH is not a problem as you can always move the thing your building around in side the SPH to a spot where you can see what you are trying to see.

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