Jump to content

[1.8.x] KSPWheel - Physics Based Alternate Wheel Collider [API Only]


Shadowmage

Recommended Posts

Perfect,

thank you for your thorough reply and update of code :) I'll try to mess with the wheel code next week when I have more family-free time :)

edit:

@Shadowmage yeah, it was simply moving wheelCollider object and unparenting it of wheelPivot. Generally it's easier to set up wheel with your mod than the stock one - awesome :D

Edited by riocrokite
Link to comment
Share on other sites

10 hours ago, riocrokite said:

- do you think it would be possible to change wheel collider size with deploy/retract animation (inflating/deflaitng tyres)

For that specific functionality, I would include using standard colliders in the model, and scale those during the animation to simulate the 'inflate' bit, and finally disable the colliders (or set scale=0) on the last frame of the animation (or otherwise move/hide them).  No need to mess with the wheel-collider's config/setup for something that can be done through the animation.

 

Edit:

Also, just pushed another updated that adds config-level settings to adjust the min/max spring rating that can be adjusted on the spring-rating slider.  Note, however, that values outside of the 0.2->1.0 range are unsupported and may be unstable in many situations (the only time a higher max should be needed is for very specific vehicle configurations, mostly for 'integrated' vehicle setups with offset COM; it should -not- be needed for standard KSP-lego style parts, and will likely only cause instability in those parts).

MODULE
{
	name = KSPWheelBase
	//standard config stuff
	//...
	//standard/default values for spring rating min/max; adjust on a per-part basis if needed
	minSpringRating = 0.2
	maxSpringRating = 0.8
}

 

Edited by Shadowmage
Link to comment
Share on other sites

  • 1 month later...

I'm looking for some help from someone.

I have permission to revive an old mod, Farscape.  

It has 3 sets of landing gear, left, right and nose.  The landing gear is set up for KSP 1.0 or 1.1 (not sure).

Can someone help me get this updated for 1.2? Either using KSPWheel or stock KSP wheel modules.

The configs which currently exist are:

// All three gears have the following section
	MODULE
	{
		name = ModuleLandingGear
		BrakeTorque = 12
		BrakeSpeed = 3
	}

// Only the nose gear has the following section
	MODULE
	{
		name = ModuleSteering
		controlAxisType = Forward
		steeringAxis = 0, 1, 0
		steeringTransformName = Steering
		steeringLocked = false
		steeringCurve
		{
			key = 0 16
			key = 10 9
			key = 30 2
			key = 100 1
		}
	}

Thanks in advance

Edited by linuxgurugamer
Link to comment
Share on other sites

25 minutes ago, linuxgurugamer said:

I'm looking for some help from someone.

I have permission to revive an old mod, Farscape.  

It has 3 sets of landing gear, left, right and nose.  The landing gear is set up for KSP 1.0 or 1.1 (not sure).

Can someone help me get this updated for 1.2? Either using KSPWheel or stock KSP wheel modules.

The configs which currently exist are:


// All three gears have the following section
	MODULE
	{
		name = ModuleLandingGear
		BrakeTorque = 12
		BrakeSpeed = 3
	}

// Only the nose gear has the following section
	MODULE
	{
		name = ModuleSteering
		controlAxisType = Forward
		steeringAxis = 0, 1, 0
		steeringTransformName = Steering
		steeringLocked = false
		steeringCurve
		{
			key = 0 16
			key = 10 9
			key = 30 2
			key = 100 1
		}
	}

Thanks in advance

What behaviour are you seeing from the wheels with Farscape?  It is a very similar set up to the Kerbin Shuttle Orbiter wheels.  Are you getting some crazy spin outs when landing? Are you rolling cheeks first down a shallow slope (yay missing the runway) even with the brakes on and all of the sliders in the R-click menu maxed out?

Link to comment
Share on other sites

15 minutes ago, smotheredrun said:

What behaviour are you seeing from the wheels with Farscape?  It is a very similar set up to the Kerbin Shuttle Orbiter wheels.  Are you getting some crazy spin outs when landing? Are you rolling cheeks first down a shallow slope (yay missing the runway) even with the brakes on and all of the sliders in the R-click menu maxed out?

The configs I listed are very old.  When I tried it, I saw the following:

  • no steering
  • gear cannot be retracted, it seems to  ignore the landing gear key
Link to comment
Share on other sites

31 minutes ago, linuxgurugamer said:

The configs I listed are very old.  When I tried it, I saw the following:

  • no steering
  • gear cannot be retracted, it seems to  ignore the landing gear key

Ok, so very different problems.  Well the KSO gears for both shuttles "work" in 1.3... although the smaller gear can do a neat spin out sometimes, and the larger gear doesn't like hills.

I have a current patch for both shuttles' gear sets.  Would you like to look at them?

PM sent

Edited by smotheredrun
Link to comment
Share on other sites

6 hours ago, smotheredrun said:

Ok, so very different problems.  Well the KSO gears for both shuttles "work" in 1.3... although the smaller gear can do a neat spin out sometimes, and the larger gear doesn't like hills.

I have a current patch for both shuttles' gear sets.  Would you like to look at them?

PM sent

Thanks, I'll take a look at it.

Link to comment
Share on other sites

@linuxgurugamer

I could help get things setup for KSPWheel if desired (sorry, can't help with the stock modules, no clue how they function).

Do you currently have a repository setup with the existing configs and model (.mu) files I could take a look at?  (and from there could simply send you a PR with the updated configs)    --   need access to the models as so very much of the plugins/configs depends on how the models are setup;  KSP/.mu models are fine there, as I can use Sarbians DebugStuff to view mesh data and/or import into blender if needed.

If interested just tag me / PM me with the details.  I should hopefully have time within the next couple of days to put it together for you if needed.

Link to comment
Share on other sites

13 minutes ago, Shadowmage said:

@linuxgurugamer

I could help get things setup for KSPWheel if desired (sorry, can't help with the stock modules, no clue how they function).

Do you currently have a repository setup with the existing configs and model (.mu) files I could take a look at?  (and from there could simply send you a PR with the updated configs)    --   need access to the models as so very much of the plugins/configs depends on how the models are setup;  KSP/.mu models are fine there, as I can use Sarbians DebugStuff to view mesh data and/or import into blender if needed.

If interested just tag me / PM me with the details.  I should hopefully have time within the next couple of days to put it together for you if needed.

I will soon, thanks.  Will PM you the link when it's there

Link to comment
Share on other sites

Updated release is available:

https://github.com/shadowmage45/KSPWheel/releases/tag/0.9.5.17

Change log:

  • FIX - KSPWheelDamage module now uses fixed-delta time/time warp multipliers to calculate damage-from-speed. Should resolve issues of wheels breaking on craft while in orbit.
  • FIX - KSPWheelBase now disabled wheel updates when in 'HIGH' timewarp mode (non-physics warp). Should resolve issues of wheels breaking during timewarp (they were colliding with other parts in the same vessel).
  • FIX - Animation time queries for inverted animations (retract style animations, rather than the officially supported deploy style). Should clean up problems of offset suspension positioning. Might still have issues/have created other issues....
  • CHANGE - Add capability to adjust friction multipliers from in-game, both globally and per-part (multiplicative).
    • Global settings are accessed from the in-game difficulty->KSPWheel settings menu.
    • Per-part settings must first be activated/enabled from the in-game difficulty->KSPWheel settings menu.

 

Will be working on an updated KF version later today/tomorrow.  Think I have a couple models to rig and make configs for... (more new leg(s))....

Link to comment
Share on other sites

  • 3 weeks later...

I randomly encounter some issue when ALG rolling through trigger collider, it will consider trigger collider as typical collider.

Is it necessary to change all collider to layer part trigger to avoid this from happening, 

Link to comment
Share on other sites

11 hours ago, flywlyx said:

I randomly encounter some issue when ALG rolling through trigger collider, it will consider trigger collider as typical collider.

Is it necessary to change all collider to layer part trigger to avoid this from happening, 

Do you have a scenario that I can use for testing/debugging in which this problem reliably occurs?

From my understanding of Unity, the raycast used for suspension check should ignore trigger colliders.  This may be a mis-understanding though;  currently most stock-KSP trigger colliders are ignored due to layer-mask setup, and it could just be coincidence that I haven't ran into a problem so far.

Hmmm... from a bit of reading/research, I might need to adjust/update the KSPWheel code to ignore trigger colliders at the raycast level.  Have opened an issue ticket regarding this, feel free to post any further relevant info directly to the ticket.  ( http://answers.unity3d.com/questions/279514/raycast-ignore-trigger-colliders.html )    ( https://github.com/shadowmage45/KSPWheel/issues/45 )

@flywlyx 

Fixed in dev version; feel free to try the updated KSPWheel.dll from the dev branch to see if it resolves your problems.  --  https://github.com/shadowmage45/KSPWheel/raw/dev/GameData/KSPWheel/Plugin/KSPWheel.dll

Link to comment
Share on other sites

10 hours ago, Shadowmage said:

Fixed in dev version; feel free to try the updated KSPWheel.dll from the dev branch to see if it resolves your problems

Looking good so far for fixed points that I was having issues earlier. Thanks very much!

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 3 weeks later...
33 minutes ago, FellipeC said:

I searched but could not find, does anyone made module manager patches to stock landing gears use this module?

There's an old patchset from the alpha versions of KSPWheel for stock parts, but Shadowmage experienced too many poorly-made requests and complaints in relation to them and so discontinued them. I'm not sure if he made them available again seperately, but they're in the Kerbal Foundries repo history somewhere.

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