Jump to content

[1.8.x] Kerbal Foundries -- Continued - Tracks, Wheels, and Gear


Shadowmage

Recommended Posts

23 hours ago, V8jester said:

Yes they do. But, They will however (I believe activate upon undocking from mothership) And as I said. Still tinkering and just asking if anyone else was working on Replusor crafts docked to larger crafts and what they have come up with.

I am using the Kerbal Foundries 2.0.1.3 and KSPWheel 0.9.3.13

?

Link to comment
Share on other sites

11 hours ago, Rodger said:

Just found a bug with the repulsor particles when flying over water... They don't despawn:

 

 

Thanks for the report.  Noticed this last night myself during testing, and is already fixed in dev mode.

Its not that they don''t despawn... its that their lifetime is the same as the repulsors velocity (in seconds), so if a repulsor is going 30m/s...the particles have a 30s lifetime.  This is supposed to be a normalized value from 0-1, but instead got the raw value -- fixed it up to normalize versus a pre-set maximum speed (as was the old mechanics), with a maximum lifetime of 1s.

Fix will be available with the next KSPWheels release.

Link to comment
Share on other sites

On 27/02/2017 at 10:26 PM, Shadowmage said:

@SpannerMonkey(smce)

I'll be rigging them with a single wheel collider as there is no way to use two WC's on a single suspension rigging.  As it is only a single wheel-collider, it will use only a single motor, steering, brakes, damage, etc. modules.

If your wheel part contains the wheels from both left and right sides (a dual-dually set), as long as they have independent suspension you should be able to use a single base-module with multiple wheel collider definitions (one collider for each side).

If you look in KFSuspension, you'll find I had a cunning method to handle multiple colliders, which also enabled swinging beam suspension with clever use of a dummy object and LookAt.

@Shadowmage

Edited by lo-fi
Link to comment
Share on other sites

So would it be possible to use this to patch pre 1.2 mods? I noticed you included patches for stock parts to swap out the stuff that handles the wheels. I've been playing with the pandora rover from lion head and currently its non functional, but the wheelcolider is setup probably in the same way.

The wiki said I need to setup the rigidbody, but I can't figure out it that is in blender, unity or can be worked around.

 

Link to comment
Share on other sites

34 minutes ago, MacLuky said:

So would it be possible to use this to patch pre 1.2 mods?

Yes.

Edit:  You should be able to use any existing wheel models as long as they were compatible with either the pre KSP-1.1 rigging OR the KSP-1.1 rigging;  basically if it did use the stock rigging at some point, it should be compatible with the existing KSPWheel part modules.

There are a few exceptions -- you will not be able to get the rocker-bogey system(s) working from some of the probes in that pack.  These wheels require independent spring based suspension -- no suspension = no friction = no working wheels.   (Investigating potential solutions/workarounds to that, but still a ways out at best, and quite possible that it will never work out)

34 minutes ago, MacLuky said:

The wiki said I need to setup the rigidbody, but I can't figure out it that is in blender, unity or can be worked around.

Only if you are writing your own PartModules (c# code) -- otherwise you only need to worry about the part configs if you intend to use the existing KSPWheel PartModules.

Edited by Shadowmage
Link to comment
Share on other sites

9 hours ago, lo-fi said:

If you look in KFSuspension, you'll find I had a cunning method to handle multiple colliders, which also enabled swinging beam suspension with clever use of a dummy object and LookAt.

@Shadowmage

Thanks, I'll certainly take a look at it again.  When last I looked it appeared to be mostly just averaging the compression from each wheel collider, and using that averaged value for the position of the suspension; which seems like it would give very incorrect wheel positioning in many cases.  (Unless there is something about it that I'm not seeing?  https://github.com/KerbalFoundries/KF_plugin/blob/master/KF_plugin/KFSuspension.cs#L101-L124  )

Link to comment
Share on other sites

1 hour ago, Shadowmage said:

Yes.

Edit:  You should be able to use any existing wheel models as long as they were compatible with either the pre KSP-1.1 rigging OR the KSP-1.1 rigging;  basically if it did use the stock rigging at some point, it should be compatible with the existing KSPWheel part modules.

There are a few exceptions -- you will not be able to get the rocker-bogey system(s) working from some of the probes in that pack.  These wheels require independent spring based suspension -- no suspension = no friction = no working wheels.   (Investigating potential solutions/workarounds to that, but still a ways out at best, and quite possible that it will never work out)

Only if you are writing your own PartModules (c# code) -- otherwise you only need to worry about the part configs if you intend to use the existing KSPWheel PartModules.

Cool! I'll try that!

Link to comment
Share on other sites

On 2/14/2017 at 1:13 PM, Madrias said:

Given that tracks are notoriously hard to steer in large groups, and that Infernal Robotics joints don't have an auto-return to center, would it be possible to make a steering pivot, something that could be attached to the vehicle either on the track nodes or in the middle for articulation, that would allow heavy vehicles to have a better steering circle?

While steering the tracks may be a bit out there, the one I want is more like you see on heavy construction equipment, like the bucket loaders, that pivot at a central point to steer.

 

I'm not sure how effectively KSP manages to model reality here, but if it's close... it actually has little to do with how many tracks you have. Tank steer is tank steer, whether it's two tracks or ten.

Instead, what determines how well a tracked vehicle is able to steer is its footprint. There's an accepted range of ratios of length to width that produce tracked vehicles that are both maneuverable and stable. Too wide, and it's extremely maneuverable, but very unstable. Too long, and it's extremely stable, but not very maneuverable--or in extreme cases, unable to steer whatsoever.

Sooo, where I'm going with this is, try making your large vehicles wider, to be about a 1.5:1 ratio of length:width, and you should have no trouble with scrub steering or stability.

Alternatively, using a half-track design can help a lot as well, with either two wheels, or two scaled-up surface tracks on the front for primary steering. If you leave tank steering enabled on all wheels (with half-track mode on), you should get halfway decent performance even at low speeds.

Link to comment
Share on other sites

Question: What exactly do the settings for the repulsors do? I used to use them back around 1.1 or so, but there are a couple more options now, specifically ForceAxis (HitNormaland Suspension) and Force Application (Standard and Offset)

Link to comment
Share on other sites

8 minutes ago, FirroSeranel said:

Question: What exactly do the settings for the repulsors do? I used to use them back around 1.1 or so, but there are a couple more options now, specifically ForceAxis (HitNormaland Suspension) and Force Application (Standard and Offset)

IIRC, Force Application prevents the "riding on sticks" effect they were so notorious for (I'm not sure which is which). The Force Axis changes between conventional, straight away from the ground ("Hit Normal") and something more akin to how an engine works, pushing through the part itself ("Suspension").

Link to comment
Share on other sites

9 hours ago, 0111narwhalz said:

IIRC, Force Application prevents the "riding on sticks" effect they were so notorious for (I'm not sure which is which). The Force Axis changes between conventional, straight away from the ground ("Hit Normal") and something more akin to how an engine works, pushing through the part itself ("Suspension").

 

Hmm... still not entirely clear. So Suspension sounds like probably how a wheel would work, only able to provide cushioning in one direction, and firm impact in all others, and Hit Normal... maybe makes it like it's just an I-Beam sticking down to the ground, so it's firm in all directions?

Then... if I were adding another feature, that would mean that Standard is like a wheel right under the repulsor unit, and Offset makes it like a bubble of force, kind of.

Is that... anything like what it actually is?

Basically what I want to do is use surface repulsors on the roof and/or sides of a rover to keep it from flipping over, and/or keep it from getting stuck on its roof if it does flip over (and avoid destroying roof equipment like solar panels). So I'm thinking... Suspension and Offset, maybe?

I'd never been able to get that to work with the old KF, so I always just wound up using miniaturized surface tracks. But if these new settings can make it work, repulsors look so much cooler than little tracks sticking out all over the place. Or I'd use Infernal Robotics, but since it isn't updated yet, that's a no-go. Though I suppose I could use one of the robotic arms from Konstruction... but they're bright yellow.

Link to comment
Share on other sites

No, the force axis is something more like this:

Visualise a car on a road. If the front suspension changes its castor (rotates around the axle), the force it applies doesn't change. It's always normal to the surface of the road. By changing the castor, the car doesn't start rolling forward or backward. This is the HitNormal mode. If you were using some kind of magical machine that repels the ground along its axis (like a repulsor), it might change direction with a change of castor. It's like the car from earlier would be able to accelerate just by rotating its suspension axis. It makes no sense for a spring to act like that, but it might for an antigravity thingy.

Link to comment
Share on other sites

7 minutes ago, 0111narwhalz said:

No, the force axis is something more like this:

Visualise a car on a road. If the front suspension changes its castor (rotates around the axle), the force it applies doesn't change. It's always normal to the surface of the road. By changing the castor, the car doesn't start rolling forward or backward. This is the HitNormal mode. If you were using some kind of magical machine that repels the ground along its axis (like a repulsor), it might change direction with a change of castor. It's like the car from earlier would be able to accelerate just by rotating its suspension axis. It makes no sense for a spring to act like that, but it might for an antigravity thingy.

 
 
 

Ahhh, so it shifts it from just a physical (but invisible) collider, to in effect, a thrust vector that only works near the ground, like a hovercraft, or maglev (well, or how a maglev would work without any induced eddy currents preventing that very effect). Ah, hence the gimbaled repulsor, which would never have worked in the old KF. I think I get it.

So I think for my roof repulsor, I'd want HitNormal and Offset... will give it a go when I get done with work.

Edit: Actually no, I think I'd want Suspension and Offset, so it would actually accelerate the vehicle in the direction it's leaning, to give it more intertia to get over the wider base of the wheels.

Edited by FirroSeranel
Link to comment
Share on other sites

@Shadowmage, if we're right about how "Suspension" works (shifts it from a physical collider that can't accelerate the vehicle, to a thrust vector that can), perhaps renaming it from Suspension to Thrust, or Vectored or something, might make it less confusing. Maybe also rename from HitNormal to Hover.

I still don't have a clear picture of what "Offset" does, vs "Standard". Perhaps you could weigh in here when you have time?

Link to comment
Share on other sites

6 minutes ago, FirroSeranel said:

@Shadowmage, if we're right about how "Suspension" works (shifts it from a physical collider that can't accelerate the vehicle, to a thrust vector that can), perhaps renaming it from Suspension to Thrust, or Vectored or something, might make it less confusing. Maybe also rename from HitNormal to Hover.

I still don't have a clear picture of what "Offset" does, vs "Standard". Perhaps you could weigh in here when you have time?

To make a long story short --

Don't touch either of those settings, they are left over from development/testing and will be removed in a future release.  Neither of them are intended to be configured or configurable.  At one point I thought it might be desirable to have some configuration on them, but further testing revealed it would be a bad idea.

And also the gimballed repulsor will be going away.  It doesn't do anything special currently, and the gimbal mechanics will not work properly; manual gimbal doesn't work (e.g. ModuleGimbal) as it changes the compression too fast, and the old 'point at the ground' gimbal won't work as if it were to ever 'point at the ground' in a way that went through the craft... bad things would happen (these repulsors can exert force on parts of the same craft, you would end up with some form of kraken-drive due to the slop in the joints; equal and opposite forces are not in fact equal or opposite when dealing with Unity joints).

Link to comment
Share on other sites

Spent a bit of time last night playing around with methods to constrain wheels so that they appear to be rigidly linked.  Sadly, none of that went anywhere -- impossible to do without internal access to the rigidbody+constraint information or using a single non-jointed rigidbody.

However I realized a method that would allow me to very easily add a configurable 'anti-roll-bar' ( https://en.wikipedia.org/wiki/Anti-roll_bar ) setup to wheels when used in 2-way symmetry. 

Before I go through the work of coding, integration, and testing -- is there any interest in this feature?  It would only function between wheels placed in symmetry, and would have a configurable stiffness coefficient (0 - disabled, 1 - same stiffness as the main spring).

 

(Probably should have posted this in the KSPWheels thread, but w/e...)

Link to comment
Share on other sites

16 minutes ago, Shadowmage said:

However I realized a method that would allow me to very easily add a configurable 'anti-roll-bar' ( https://en.wikipedia.org/wiki/Anti-roll_bar ) setup to wheels when used in 2-way symmetry. 

What's that?

16 minutes ago, Shadowmage said:

is there any interest in this feature? 

YES!

I've been trying to engineer this functionality for almost a week straight! PLEASE say you can implement it on repulsors!

Link to comment
Share on other sites

17 minutes ago, Shadowmage said:

is there any interest in this feature?

(Probably should have posted this in the KSPWheels thread, but w/e...)

Yes.  would be great for heavily laden trucks. could use now . Please include AG switching as anti rollbar set up typically limit articulation, being switchable would allow good road manners while still giving the wheels the greatest potential to be in ground contact when on the rough stuff.

Link to comment
Share on other sites

35 minutes ago, 0111narwhalz said:

I've been trying to engineer this functionality for almost a week straight! PLEASE say you can implement it on repulsors!

What?  Repulsors have no friction, and thus no steering induced body-sway.

No, I will not be enabling it for repulsors, sorry.  Unless you can present a use-case where it would 1.) be useful, and 2.) make sense.  (hint, you'll never meet #2; an anti-sway bar is a mechanical linking between two suspensions; repulsors have no mechanical anything, and thus are not a candidate for an anti-roll-bar).

 

 

AG requests -- the PR button is that way --> https://github.com/shadowmage45/KSPWheel/pulls

Link to comment
Share on other sites

1 minute ago, Shadowmage said:

What?  Repulsors have no friction, and thus no steering induced body-sway.

No, I will not be enabling it for repulsors, sorry.  Unless you can present a use-case where it would 1.) be useful, and 2.) make sense.  (hint, you'll never meet #2; an anti-sway bar is a mechanical linking between two suspensions; repulsors have no mechanical anything, and thus are not a candidate for an anti-roll-bar).

1.) My Bounder is desirous of a swaybar. It unweights the inside front wheel and has lackluster turning because. If the rear suspension didn't let the body roll so much, it could keep the inside wheel weighted.
2.) Computer-controlled talk between the repulsors.

Link to comment
Share on other sites

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