Jump to content

wheel problem


Recommended Posts

can you point me to information or a tutorial on creating suspension?

The only thing there is is the picture Devo posted on the first page of this thread, thats literally all the information on stockwheels that exists. Not to say that isn't enough - There are stock based wheels starting to appear.

The debug says

Here's a picture of what it looks like in parttools:

http://i283.photobucket.com/albums/kk293/deltafee/WP_zpsc1d7cbcf.png

Here's What it looks like in ksp:

http://i283.photobucket.com/albums/kk293/deltafee/WPD_zpse92aaa66.png

I don't see anything in the heirarchy called "wheelCollider" which has to exist as a seperate object, it can't be part of "Wheel". You also must have an animation, any animation, even a totally blank one that does nothing, for the stock landing gear module to work properly. You also have to define that animation name in the CFG (see the original thread where the how to make landing gear pic comes from, it defines all the floats and strings in the landingearmodule you can access, including retract animation) Also the stock landing gear module isn't designed to deal with two wheels at once as far as I'm aware. The only work around would be to have only one object called "wheelCollider" and only one called "Wheel", but there would be no reason the "Wheel" object couldn't be completely empty, then have two wheel models in the heirachy below it. Obviously this means it'd really behave like only one wheel, but graphically it'd look like two.

EDIT:

A Null Reference Exception basicaly means its looking for a named object that doesn't exist. Be it either the "wheelCollider" Object or an animation going by a certain name.

Link to comment
Share on other sites

Hey TouhouTorpedo where is that thread at?

here's what I did from what you said TouhouTorpedo

http://i283.photobucket.com/albums/kk293/deltafee/Wheel_zps223c31de.png

I reconfigured the part.cfg

PART

{

// --- general parameters ---

name = N.C.R. Galileo Starboard GearBay

module = Part

author = C. Jenkins

// --- asset parameters ---

mesh = model.mu

scale = 1

rescaleFactor = 1

// --- node definitions ---

node_stack = 0.0, 0.25, 0.0, 1.0, 0.0, 0.0, 1

// --- FX definitions ---

// --- Sound FX definition ---

// --- editor parameters ---

cost = 450

category = Utility

subcategory = 0

title = Galileo Starboard GearBay

manufacturer = New California Rockets

description = High performance gear designed for atmospheric use.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 1,0,1,1,0

// --- standard part parameters ---

mass = 0.5

dragModelType = default

maximum_drag = 0.3

minimum_drag = 0.2

angularDrag = 1

crashTolerance = 7

maxTemp = 3600

fuelCrossFeed = False

crashTolerance = 50

breakingForce = 50

breakingTorque = 50

MODULE

{

name = ModuleLandingGear

}

MODULE

{

name = ModuleAnimateGeneric

animationName = NAC

animSwitch = true // should default the animation to active, make sure your animation loops.

}

}

It's still having problem though.

Edited by Deltafee
Link to comment
Share on other sites

The only thing there is is the picture Devo posted on the first page of this thread, thats literally all the information on stockwheels that exists. Not to say that isn't enough - There are stock based wheels starting to appear.

I don't see anything in the heirarchy called "wheelCollider" which has to exist as a seperate object, it can't be part of "Wheel". You also must have an animation, any animation, even a totally blank one that does nothing, for the stock landing gear module to work properly. You also have to define that animation name in the CFG (see the original thread where the how to make landing gear pic comes from, it defines all the floats and strings in the landingearmodule you can access, including retract animation) Also the stock landing gear module isn't designed to deal with two wheels at once as far as I'm aware. The only work around would be to have only one object called "wheelCollider" and only one called "Wheel", but there would be no reason the "Wheel" object couldn't be completely empty, then have two wheel models in the heirachy below it. Obviously this means it'd really behave like only one wheel, but graphically it'd look like two.

EDIT:

A Null Reference Exception basicaly means its looking for a named object that doesn't exist. Be it either the "wheelCollider" Object or an animation going by a certain name.

The rover wheel hierarchy is not also equipped to deal with 2 wheels at the moment either. The best I could do (to even get close to your freakin awesome double axle wheel ) was to use a single wheel collider in the middle of the two wheels and sort of fake it.

Link to comment
Share on other sites

The rover wheel hierarchy is not also equipped to deal with 2 wheels at the moment either. The best I could do (to even get close to your freakin awesome double axle wheel ) was to use a single wheel collider in the middle of the two wheels and sort of fake it.

Spoiler Alert : The double axle wheel actually does the same thing! I'd intended to do it that way as a placeholder and lead up to double wheel colliders, but situations where you'd even notice the difference are so rare I didn't do it. Although if I did code it up to work with double colliders, it'd at least be more stable. The other option would be a Left/Right disabling code, just like I've done with the trailer wheels, so you can make them more stable on one side than the other.

...second thoughts thats a good idea. Maybe I'll do that.

Link to comment
Share on other sites

Spoiler Alert : The double axle wheel actually does the same thing! I'd intended to do it that way as a placeholder and lead up to double wheel colliders, but situations where you'd even notice the difference are so rare I didn't do it. Although if I did code it up to work with double colliders, it'd at least be more stable. The other option would be a Left/Right disabling code, just like I've done with the trailer wheels, so you can make them more stable on one side than the other.

...second thoughts thats a good idea. Maybe I'll do that.

haha well im glad i wasnt going crazy, if you couldn't get 2 colliders on there then no one can, not as you said without some code support. It would really give those double wheels the feeling of being double wheels, but in saying that, they are still pretty good tho, I can't say there is any other wheels id recommend to anyone for large craft or large vehicles, they pretty much are on all my craft.

Link to comment
Share on other sites

You know that's both very interesting and I would love to help you guys with it, but can you guys first help me with my problem?

Hey TouhouTorpedo where is that thread at?

here's what I did from what you said TouhouTorpedo

http://i283.photobucket.com/albums/k...ps223c31de.png

I reconfigured the part.cfg

PART

{

// --- general parameters ---

name = N.C.R. Galileo Starboard GearBay

module = Part

author = C. Jenkins

// --- asset parameters ---

mesh = model.mu

scale = 1

rescaleFactor = 1

// --- node definitions ---

node_stack = 0.0, 0.25, 0.0, 1.0, 0.0, 0.0, 1

// --- FX definitions ---

// --- Sound FX definition ---

// --- editor parameters ---

cost = 450

category = Utility

subcategory = 0

title = Galileo Starboard GearBay

manufacturer = New California Rockets

description = High performance gear designed for atmospheric use.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 1,0,1,1,0

// --- standard part parameters ---

mass = 0.5

dragModelType = default

maximum_drag = 0.3

minimum_drag = 0.2

angularDrag = 1

crashTolerance = 7

maxTemp = 3600

fuelCrossFeed = False

crashTolerance = 50

breakingForce = 50

breakingTorque = 50

MODULE

{

name = ModuleLandingGear

}

MODULE

{

name = ModuleAnimateGeneric

animationName = NAC

animSwitch = true // should default the animation to active, make sure your animation loops.

}

}

It's still having problem though.

Link to comment
Share on other sites

So I am still getting the null reference.

Here's what is happening in the game

-----------------------------------

WheelNull_zpsce4be641.png

===========================

Here's what I did:

------------------

Wheel_zps223c31de.png

Here's my part.cfg:

-------------------

PART

{

// --- general parameters ---

name = N.C.R. Galileo Starboard GearBay

module = Part

author = C. Jenkins

// --- asset parameters ---

mesh = model.mu

scale = 1

rescaleFactor = 1

// --- node definitions ---

node_stack = 0.0, 0.25, 0.0, 1.0, 0.0, 0.0, 1

// --- FX definitions ---

// --- Sound FX definition ---

// --- editor parameters ---

cost = 450

category = Utility

subcategory = 0

title = Galileo Starboard GearBay

manufacturer = New California Rockets

description = High performance gear designed for atmospheric use.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 1,0,1,1,0

// --- standard part parameters ---

mass = 0.5

dragModelType = default

maximum_drag = 0.3

minimum_drag = 0.2

angularDrag = 1

crashTolerance = 7

maxTemp = 3600

fuelCrossFeed = False

crashTolerance = 50

breakingForce = 50

breakingTorque = 50

MODULE

{

name = ModuleLandingGear

}

}

Link to comment
Share on other sites

why does the wheel have an animation? applied? quite sure that isn't right.

Something I do I think you may be missing is having the animation applied to one game object, that is parent to the suspensionParent. Then set your animation on that game object only, and be sure that animation name exactly what you tell it to use.

Link to comment
Share on other sites

Okay. so how does this look:

NWheel_zpse38698ad.png

Where W1 and W2 are just mesh Renderers and the empty Game_Object is both suspensionParent and Wheel and WheelCollider is the single wheel Collider.

The animation Wheel is on the suspensionParent gameobject and I take it that its the animation of the wheel rotating. I haven't tried it because I have a feeling there is alot more that needs to be done before it works correctly. So I guess the next question is what do I do next?

Link to comment
Share on other sites

Okay. so how does this look:

NWheel_zpse38698ad.png

Where W1 and W2 are just mesh Renderers and the empty Game_Object is both suspensionParent and Wheel and WheelCollider is the single wheel Collider.

The animation Wheel is on the suspensionParent gameobject and I take it that its the animation of the wheel rotating. I haven't tried it because I have a feeling there is alot more that needs to be done before it works correctly. So I guess the next question is what do I do next?

No, there should be no animation of the wheel rotating. Remove that.

What you needed was an animation to retract the wheel, or placed where you would have placed it if you did want it to retract. (what the animation actually contains doesn't matter, but absolutely do NOT animate suspensionParent, Wheel or wheelCollider. Animating a parent of these in the heirarchy is fine)

Did you reduce the wheel mass like I said to do by the way, so the brakes might work?

Link to comment
Share on other sites

Well than it's still not working :/

You've still not done what I suggested, either about putting the animation above everything in a new game object - you've also got quite a lot of stuff in the wrong place now.

Make this your heirarchy

Port

>CenterFlap1

>CenterFlap2

>GearBox

>OuterFlap1

>OuterFlap2

>Retract (ANIMATION MUST BE ON THIS ONE)

>>wheelCollider (WHEEL COLLIDER GAME OBJECT HERE, NO MODEL)

>>suspensionParent

>>>Wheel (BLANK GAME OBJECT, NO MODEL, NO COLLIDER)

>>>>wheelmodel1 (MODEL, NO COLLIDERS)

>>>>wheelmodel2 (MODEL, NO COLLIDERS)

Next screenshot you do if it doesn't work ensure you are showing exactly that heirarchy.

Link to comment
Share on other sites

Don't the stock wheels throw the same error?

All WheelColliders imported from mu files do, presumably the game is setting stuff up in the wrong order. It's not a warning you need to worry about though, it shouldn't affect functionality.

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