Jump to content

Rover Wheel problems, New fault finding info UNITY wheel build package


Recommended Posts

Well it took longer than expected, didn't take long to make one that sort of worked, but tuning it took a while, especially with the constraint of only using an almost standard hierarchy, so here you go a full unity breakdown of whats needed to make a Ski type thing with a minimum of fuss and parts. I have included a download that has full res screen grabs, the actual dae that was imported into unity, so you can open in any modeling software that will read dae which is most I think, and the .mu so you can bust it open in blender and see how it looks with all the transforms in place , be warned however you will not be able to put that straight back in unity without some re editing due to the mu exporter misplacing transforms etc.

The model only comprises 7 parts in total, 2 of which are not absolutely required but do make lie better later on.

Basically anything that you want to move up and down should be a child of the suspensionTraverse transform, and anything you want to stay put is a child of the base.

NOw the gallery, i think I've made it fairly self explanatory but if theres something you don't understand I'd be happy to answer your questions.

http://imgur.com/a/92Ylq

And this is the cfg that I used for the test version this is where the two extra parts come in.

PART
{
name = ProjectSkidsrevdC
module = Part
author = Spanner

mesh = model.mu
scale = 1
rescaleFactor = 1

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

TechRequired = advancedMotors
entryCost = 6000

cost = 580
category = Utility
subcategory = 0
title = ProjectSkidsrevdC
manufacturer = SMSE
description = See if this works..ProjectSkidsrevdC. a new format for wheels

attachRules = 0,1,0,1,0

mass = 0.5
dragModelType = default
maximum_drag = 0.3
minimum_drag = 0.2
angularDrag = 1
maxTemp = 3600

crashTolerance =3000
breakingForce = 3000
breakingTorque = 3000

MODULE
{
name = ModuleWheel
hasMotor = true
resourceName = ElectricCharge
resourceConsumptionRate = 0.1
canSteer = true
hasBrakes = true
controlAxisType = Forward
steeringModeType = AutomaticSteer
brakeTorque = 100
brakeSpeed = 2.5
impactTolerance = 3000
overSpeedDamage = 600

WHEEL
{
wheelName = wheelC
wheelColliderName = wheelColliderC
suspensionTransformName = suspensionTraverseC
suspensionNeutralPointName = suspensionNeutralPointC

rotateX = 1
rotateY = 0
rotateZ = 0
}
//////////////////optional wheel elements that would be fitted in unity to the front and rear of the skid to prevent the collider digging in//////////////
//WHEEL
// {
// wheelName = wheelF
// wheelColliderName = wheelColliderF
// suspensionTransformName = suspensionTraverseF
// suspensionNeutralPointName = suspensionNeutralPointF
//
// rotateX = 1
// rotateY = 0
// rotateZ = 0
// }
//WHEEL
// {
// wheelName = wheelR
// wheelColliderName = wheelColliderR
// suspensionTransformName = suspensionTraverseR
// suspensionNeutralPointName = suspensionNeutralPointR
//
// rotateX = 1
// rotateZ = 0
// }
steeringCurve
{
key = 0 30
key = 10 10
key = 20 5
}

torqueCurve
{
key = 0 50 0 0
key = 10 80 0 0
key = 25 10 0 0
key = 30 5 0 0
}

}
MODULE
{
name = FXModuleLookAtConstraint
CONSTRAINLOOKFX
{
targetName = suspT
rotatorsName = SuspB
}

CONSTRAINLOOKFX
{
targetName = SuspB
rotatorsName = suspT
}
}

MODULE
{
name = FXModuleConstrainPosition
matchRotation = true
matchPosition = false
CONSTRAINFX
{
targetName = steering
moversName = trackSteering
}

}
////non standard addition
MODULE
{
name = FXModuleConstrainPosition
matchRotation = false
matchPosition = true
CONSTRAINFX
{
targetName = PinLowB
moversName = SuspB
}

}



}

Now that is a fairly standard cfg for a wheel with addition of an extra FXModuleConstrainPosition this is to ensure that the bottom end of the the suspension part SuspB does not appear detached from the mount, and also helps with the visual effect allowing for a greater arc than would normally be visible, you could do this by just adding a transform in the location, but it saves a lot of hassle getting things aligned correctly if you put it there in your modeling. You could add a constraint the same way to the top part but its not really required.

Note the optional colliders in the pics and the cfg, if you build one and test you'll probably want to add more wheels to prevent the nose dig in that occurs due to the skids collider grabbing the terrain.

This cfg includes motor and steering torque, to remove that just edit the cfg to remove the second set of numbers following the key so

 key = 0 50 0 0 

would change to

 key = 0 0 0 0 

and

 key = 10 10

changes to

 key = 10 0

The same can be done to any rover wheel to increase/decrease speed and steering rate

And just in case you missed it heres the DOWNLOAD again

http://i.imgur.com/mOPjcJG.png

Good work that man! I need to free some time to share some of my insights. I've learned a lot this week.

Link to comment
Share on other sites

Well I can build landing gear my one part creations all have working gear but do not use the standard gear module as it's a bit limiting, i prefer to animate and setup as if it was a rover wheel and then use the firespitter plugin to control it via action groups, not applied it to a dedicated gear, i tend to build gear into parts so that its contained within the wings or fuselage which means that using a standard module is not really ideal. Theres no real reason why I couldn't build gear in pods though, always looking for collaboration projects though, if you had something in mind .

This is how it looks built in

SCX7iAt.png

Link to comment
Share on other sites

Spanner, I swear you must have a treasure trove of stuff you haven't released stored up on that PC!

Landing gear is my next project, I have some mental ideas :)

Did this thread ever make it into the modding compilation thread? It really needs to.

EDIT: also, might I suggest we start a separate landing gear thread?

Link to comment
Share on other sites

The Skylon I'm building also has gear retract into the fuselage and wings (hopefully, if I can get it set up). I was hoping to give the gear stack nodes, instead of having them surface attach. Is that possible? I'm guessing that's what you're doing.

Have a look at the thread in my signature.

Link to comment
Share on other sites

At last count I have in excess 241 unreleased mod parts, not including scaled versions, retired mods the 3 carriers(lots of bits with them) and not counting the old mods like MMM and Bobcat stuff I've redone and re-purposed for my use, I have a bit of a creating addiction, and while I'm definitely a mod supporter, if I need a part I generally make my own. Just started my plugin adventure so who knows what'll happen next.

Before I star of take part in a Gear thread I realy need to make at least one standard gear unit(probably wont be that standard though) I'll get on to it when I've finished my latest commission, prob sometime tomorrowish.

Have a great weekend btw ChooChOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!

Link to comment
Share on other sites

I have so many pm's in which i answer relevant question I thought it about time i started sharing some of this stuff with you the wheel creators. This from a convo regarding some dev work I've carried out on behalf of an unreleased/unfinished mod

Yes questions. Probably tons,

Ok, looking at the project, is it possible to replace the wheel style, retaining the suspension and steering?

How is the hierarchy laid down?

thanks,

Corporal Vasquez

USCSM/KSCSM 8thBMTS Sulaco.

Reply

yes you can change the wheel, you need of course your new style wheel, import it to unity then simply remove the existing and drop yours in it's place, it is VITAL that the part ends up in exactly , not just close exactly the same position,

. I generate a large part of the hierarchy before I even start , you will notice that a lot of it comprises bare Named game objects /Transforms with colliders attached as required, it is CRITICAL that the wheelCollider, suspensionNeutralPoint , suspensionTraverse and steering share the same origin, not just close but exact, easily accomplished by creating an empty game object naming it the correct name then duplicating it and renaming to the next item you need. If its not perfect BAD things will happen and you will go mad trying to work out whats going on.

Hope that helps a bit, note that you can duplicate the whole object complete move it to one side and work on a duplicate, moving and changing as you wish, while having a standard version to compare to, Note also the setup is not standard squad so use my ref images and ask for clarification if you get stuck .

To ALL

I shortly intend to release a complete unity Package that contains a complete simple fully functional wheel and suspension setup, the package will contain everything you need to create and understand how it all goes together.

Link to comment
Share on other sites

I shortly intend to release a complete unity Package that contains a complete simple fully functional wheel and suspension setup, the package will contain everything you need to create and understand how it all goes together.

Including torque arms and steering?

Link to comment
Share on other sites

Ha look at me double posting .

Anyway, a little something else I could share with you, thought of keeping this to myself, for a mod, but then as I don't do direct releases anymore, preferring to work as a sub contractor ( blame these guys SpannerMonkey 52,014 Total File Downloads ) I thought I'd stick it somewhere useful

anyway

Here is a unity grab of a multiple wheel unit with two individual and fully function wheel and suspension units, note that each wheel has to have a unique name for the vital components and these have to be exactly the same in the cfg for everything to play nice, and yes it will work with landing gear although things can get a bit more complex when animation is involved, as animations can get seriously deranged by renaming or moving of parts, I suggest getting your hierarchy a close as possible in your modeling application before exporting to unity.

a2PkB6f.png

And here is the cfg part that controls it all


MODULE
{
name = ModuleWheel
hasMotor = true
resourceName = ElectricCharge
resourceConsumptionRate = 0.7
canSteer = true
controlAxisType = Forward
steeringModeType = AutomaticSteer
brakeTorque = 100
brakeSpeed = 2.5
impactTolerance = 3000
overSpeedDamage = 65

WHEEL
{
wheelName = wheel
wheelColliderName = wheelCollider
suspensionTransformName = suspensionTraverse
suspensionNeutralPointName = suspensionNeutralPoint
damagedObjectName = brokenWheel
rotateX = 1
rotateY = 0
rotateZ = 0
}
WHEEL
{
wheelName = wheel001
wheelColliderName = wheelCollider001
suspensionTransformName = suspensionTraverse001
suspensionNeutralPointName = suspensionNeutralPoint001
damagedObjectName = brokenWheel001
rotateX = 1
rotateY = 0
rotateZ = 0
}
steeringCurve
{
key = 0 20
key = 10 6
key = 30 2

}

torqueCurve
{
key = 0 10 0 0
key = 30 30 0 0
key = 40 0 0 0
}

}

MODULE
{
name = FXModuleConstrainPosition
matchRotation = true
matchPosition = false
CONSTRAINFX
{
targetName = steering
moversName = trackSteering
}

}

And yes it works with more than two wheels as long as you have the parts with unique names, , I currently have an 8 wheeled chassis unit on test, albeit with some special tweaks for the smoothSteering setup created by lo_fi(cheers again buddy), I've not found the crunch point when i can't add more wheels but undoubtedly I will:0.0::0.0:

Feel free to ask any questions.

Cheers

Spanner

Please do not duplicate the wheel unit pictured above as it is property of Lack Luster Labs inc , cheers

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 4 months later...

I tried to mod a stock wheel, by making it use liquid fuel and be more powerful, am I doing it correct? (probably not)

PART

{

name = wheelMed

module = Part

author = jojojona

mesh = model.mu

scale = 1.2

rescaleFactor = 1

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

TechRequired = advancedMotors

entryCost = 6000

cost = 580

category = Utility

subcategory = 0

title = TR-2XL Powerful Vehicular Wheel

manufacturer = Kerbal Motion LLC

description = This is the even more advanced version of the TR-2L Ruggedized Vehicular Wheel, as it uses liquid fuel instead of electrical charge. Also, it is slightly bigger and more powerful as well.

attachRules = 0,1,0,1,0

mass = 0.1

dragModelType = default

maximum_drag = 0.4

minimum_drag = 0.3

angularDrag = 1

crashTolerance = 10

maxTemp = 3600

crashTolerance = 100

breakingForce = 80

breakingTorque = 80

MODULE

{

name = ModuleWheel

hasMotor = true

resourceName = LiquidFuel

resourceConsumptionRate = 0.5

canSteer = true

controlAxisType = Forward

steeringModeType = AutomaticSteer

brakeTorque = 520

brakeSpeed = 2.5

impactTolerance = 300

overSpeedDamage = 60

WHEEL

{

wheelName = wheel

wheelColliderName = wheelCollider

suspensionTransformName = suspensionTraverse

suspensionNeutralPointName = suspensionNeutralPoint

damagedObjectName = bustedwheel

rotateX = 1

rotateY = 0

rotateZ = 0

}

steeringCurve

{

key = 0 15

key = 10 6

key = 30 2

}

torqueCurve

{

key = 0 500 0 0

key = 2.5 70 0 0

key = 30 0 0 0

}

}

MODULE

{

name = FXModuleConstrainPosition

matchRotation = true

matchPosition = false

CONSTRAINFX

{

targetName = steering

moversName = trackSteering

}

}

}

Link to comment
Share on other sites

I'll think you'll find scaling it like that (or at all) won't work without some some funny stuff happening. I've never tried running wheels on anything but EC, but I think that looks OK. What happens when you try the part in game?

Link to comment
Share on other sites

  • 3 months later...
Cheers, do shout if you want the rigged Unity scene. I just set it up for the new dimensions and bung fresh mesh in for a new design, saves a lot of bother.

Glad I was of some help, that knowledge was hard-won so worth sharing!

I have a plugin in development that allows you to tweak wheelcollider suspension settings in VAB/SPH. I was told this wasn't possible in KSP. You're welcome to test/use/distribute with your wheels when it's done, though all my stuff is pre-release I'm afraid, I've only been at this a few weeks!

Nice work, btw :D

i love your work lo-fi but is there any way i could get ahold of a unity scene with a whee in it? i am trying to make a wheel that behaves like the halo warthog to go with my mod, and so far these have been the colsest, but i cannot eddit traction and such which is what needs to be balanced, i tried wathhing your vid but i appered to be in unity 5 to your unity 4 and it was a little differenct and in the end did not work i have a texture and could remodel the wheel part of it to match but the suspesion travel on these is perfect and it would be a real help if you could share a unity scene with all the hireachy i it that i could muck about in!

Link to comment
Share on other sites

I'd advise using Unity 4.2.2. I don't believe there's any advantage in using 5 for constructing KSP parts, and some things, as you've found, will be confusingly different.

I can certainly help you out with one of my model rigs, but most are tied up with some advanced stuff in the KF plugin that's totally undocumented and include some... unorthodox rigging techniques.

Have you successfully managed to rig up a wheel in the stock fashion? Comfortable with how the hierarchy, constraint and lookat controllers work? I guarantee you'll have a "what the ...... Is this maverick doing?!" moment when you look at a KF wheel ;)

You'll also find warthog style suspension impossible without making handed parts, which means no surface attachment with symmetry. The grip settings are set when you rig the part in Unity - read up on wheel colliders to understand what's going on there.

I don't mean to put you off - it's great seeing people pick a challenge - but you've certainly got one there!

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