Jump to content

[SOLVED] Landing Gear Problems.


Recommended Posts

I don't even know where to begin with this.

But basically my wheel does not have any collision.

It sinks into the floor.

7760c26d7b.jpg

Here is the Unity setup.

Castor_Wheel_A_Base is the mesh for the box that holds the wheel

Wheel is the mesh for the wheel

wheelCollider is the wheel circular collider

4014389b2d.png

0b24da5971.png

Here is the config.

PART
{
// --- general parameters ---
name = Castor_Wheel_A
module = Part
author = Tantares

// --- asset parameters ---

mesh = model.mu
scale = 1.0


// --- node definitions ---

node_attach = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1

// --- FX definitions ---



// --- Sound FX definition ---


// --- editor parameters ---
TechRequired = landing
entryCost = 450
cost = 450
category = Utility
subcategory = 0
title = Castor Wheel
manufacturer = Rolling
description = It spins

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,1,1


// --- standard part parameters ---
mass = 0.5
dragModelType = default
maximum_drag = 0.3
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 7
maxTemp = 3600

crashTolerance = 50
breakingForce = 50
breakingTorque = 50

MODULE
{
name = ModuleLandingGear
}

MODULE
{
name = ModuleSteering
controlAxisType = Forward
steeringAxis = 0, 0, 1
steeringTransformName = suspensionParent
steeringLocked = true
steeringCurve
{
key = 0 16
key = 10 9
key = 30 2
key = 100 1
}
}

MODULE
{
name = FXModuleConstrainPosition
matchRotation = true
matchPosition = false
CONSTRAINFX
{
targetName = Steering
moversName = wheelCollider
}

}

}

Can anyone help me?

There's really a huge lack of documentation on the Landing Gear module, very frustrating to trial and error.

Many thanks in advance anyone who can help! :)

Edited by Beale
Link to comment
Share on other sites

I haven't ever modelled a wheel so it's possible I'm talking out of my 'assets' here but that wheel radius value of 0.15 seems a bit small. Maybe that's relevant, maybe not. (you'd think that the collider's actual mesh would be the deciding factor though...)

One other thing, your config: you're using ModuleLandingGear? Is that wheel retractable? If not, you should be using ModuleWheel.

Link to comment
Share on other sites

I haven't ever modelled a wheel so it's possible I'm talking out of my 'assets' here but that wheel radius value of 0.15 seems a bit small. Maybe that's relevant, maybe not. (you'd think that the collider's actual mesh would be the deciding factor though...)

One other thing, your config: you're using ModuleLandingGear? Is that wheel retractable? If not, you should be using ModuleWheel.

I'd taken a stab at ModuleWheel and found it even more difficult. The ModuleLandingGear is supposedly simpler :)

The radius of the wheel collider is along the Z-axis, so it aligns with the wheel (this is hard to put it in words).

But the radius of the wheel is 0.16, so the collider cannot be much bigger, I think...

whats your config file look like?

all else fails, post the unity assets I can take a look at the wheel.

Hi!

MODULE
{
name = ModuleLandingGear
}

MODULE
{
name = ModuleSteering
controlAxisType = Forward
steeringAxis = 0, 0, 1
steeringTransformName = Steering
steeringLocked = true
steeringCurve
{
key = 0 16
key = 10 9
key = 30 2
key = 100 1
}
}

MODULE
{
name = FXModuleConstrainPosition
matchRotation = true
matchPosition = false
CONSTRAINFX
{
targetName = Steering
moversName = wheelCollider
}

}

Link to comment
Share on other sites

It's not an exact fix to your problem... but I had so much trouble getting ModuleLandingGear to work that I switched to the FireSpitter version and had it up and running in 5 minutes. Most people who install mods have Firespitter already, so I didn't mind using it.

Link to comment
Share on other sites

I'd taken a stab at ModuleWheel and found it even more difficult. The ModuleLandingGear is supposedly simpler :)

The radius of the wheel collider is along the Z-axis, so it aligns with the wheel (this is hard to put it in words).

But the radius of the wheel is 0.16, so the collider cannot be much bigger, I think...

Oh god, see this is why I shouldn't post just before going to bed. Even though it said radius and I even typed radius, in my mind I was comparing to its diameter.

Link to comment
Share on other sites

sorry I forgot to check OP for the config file. :D

default value for wheelCollider is WheelCollider //note the capitalization.

best to complete the ModuleLandingGear properly

MODULE
{
name = ModuleLandingGear
wheelCollider = wheelCollider //name of your wheelCollider object
wheelName = Wheel //name of your wheel mesh object
suspensionParentName = suspensionParent // name of your suspension object
statusLightName = some light object // not sure if it's required. you can always set its intensity to 0 if you don't want a light.
wheelRotationAxis = 1,0,0 //XYZ format. typically it's X. negative sign will reverse the rotation.
BrakeSpeed = 0.5 //how quickly brake reaches max brake torque. I think it's in seconds
BrakeTorque = 10 // maximum braking torque.
}

you also want the wheelCollider to be slightly smaller than wheel mesh or the wheel might float above the ground slightly.

Edited by nli2work
Link to comment
Share on other sites

sorry I forgot to check OP for the config file. :D

default value for wheelCollider is WheelCollider //note the capitalization.

best to complete the ModuleLandingGear properly

MODULE
{
name = ModuleLandingGear
wheelCollider = wheelCollider //name of your wheelCollider object
wheelName = Wheel //name of your wheel mesh object
suspensionParentName = suspensionParent // name of your suspension object
statusLightName = some light object // not sure if it's required. you can always set its intensity to 0 if you don't want a light.
wheelRotationAxis = 1,0,0 //XYZ format. typically it's X. negative sign will reverse the rotation.
BrakeSpeed = 0.5 //how quickly brake reaches max brake torque. I think it's in seconds
BrakeTorque = 10 // maximum braking torque.
}

you also want the wheelCollider to be slightly smaller than wheel mesh or the wheel might float above the ground slightly.

I really thank you for your help, but the problem persists no matter how I name the nodes.

The vehicle sinks to the ground.

Wheels have no collision.

3f39f772a9.jpg

921e0c1449.png

Link to comment
Share on other sites

extend the Bounds box to include the tip of wheelCollider ray. or move the wheel collider up a bit so the tip is inside the Bounds box.

another thing with wheelCollider, it doesn't have to be centered up with suspensionParent, the point where it intersects the radius circle and the tip of the ray is the suspension travel distance. onLoad the suspensionParent object is placed at the tip of the wheelCollider ray (the lowest point). moving the wheelCollider above the suspensionParent such that the point of intersection of the ray and radius circle is at the same position as suspensionParent will help to reduce the visible "pop" when the gear is loaded or when it reaches full retracted position.

if that still doesn't work send me the Unity assets I can take a look

Edited by nli2work
Link to comment
Share on other sites

extend the Bounds box to include the tip of wheelCollider ray. or move the wheel collider up a bit so the tip is inside the Bounds box.

another thing with wheelCollider, it doesn't have to be centered up with suspensionParent, the point where it intersects the radius circle and the tip of the ray is the suspension travel distance. onLoad the suspensionParent object is placed at the tip of the wheelCollider ray (the lowest point). moving the wheelCollider above the suspensionParent such that the point of intersection of the ray and radius circle is at the same position as suspensionParent will help to reduce the visible "pop" when the gear is loaded or when it reaches full retracted position.

if that still doesn't work send me the Unity assets I can take a look

Hmm, I've played around with a few of the transforms, but to no use I'm afraid. collision (or lack of it) issue persists.

1b3845196e.png

Here's the Unity assets.

I mean I would be immensely grateful if you could demonstrate how to get this working!

But no pressure!

I'm annoyed it won't let me give you rep for all the help so far.

Link to comment
Share on other sites

I need the heirarchy setup. drag the Castor_Wheel_A object from Heirarchy panel into Project/Assets panel; that will create a Prefab of the castor wheel setup, it will have a blue cube icon without white paper marker. export the prefab as a unitypackage and include dependencies (OBJ and textures generally)

Link to comment
Share on other sites

I need the heirarchy setup. drag the Castor_Wheel_A object from Heirarchy panel into Project/Assets panel; that will create a Prefab of the castor wheel setup, it will have a blue cube icon without white paper marker. export the prefab as a unitypackage and include dependencies (OBJ and textures generally)

Ah, apologies!

Here it is: Wheel

Link to comment
Share on other sites

ModuleLandingGear requires an animation, I didn't think of that. I created a dummy animation with no movement. everything works now. just a matter of adjusting the settings in the wheelCollider and config file now.

I shortened the object names a bit, and removed some intermediate transforms that weren't necessary.

Unity files and part config

http://www./download/9s05x4g7xyef3zx/Castor_Wheel_B.zip

Edited by nli2work
Link to comment
Share on other sites

ModuleLandingGear requires an animation, I didn't think of that. I created a dummy animation with no movement. everything works now. just a matter of adjusting the settings in the wheelCollider and config file now.

I shortened the object names a bit, and removed some intermediate transforms that weren't necessary.

Unity files and part config

http://www./download/9s05x4g7xyef3zx/Castor_Wheel_B.zip

Just works perfect!

You are a bona-fide star nli2work, thanks for all your hard work with this! :D

One last thing, when I try to import your Unity Package, is there any way to recreate your hierarchy? It just loads the assets for me.

Link to comment
Share on other sites

You can rename your original prefab to something different, like Castor_Wheel_Original; then import the unity package; the imported Castor_Wheel_A prefab should have the new heirarchy setup.

pic just in case

s9OfJGC.jpg

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