Jump to content

[WIP][1.3.1] Bugfix for jumping vessels


whale_2

Recommended Posts

 

*** NOTE ***

No problem reported for latest dev version, so I've made a public release

 

There's a bug that was fixed in 1.3 and reintroduced in 1.3.1 when you enter the scene with some vessels landed and they jump up in the air (or in the lack of it).

Bug #16159
 

I've tried to fix it by introducing one more simple mod. I heavily borrowed parts of the code from VesselMover, specifically, determining vessel's top and bottom points. 

The mod moves up the vessel that just went off rails little bit up (approximately by the difference between top to ground and bottom to ground heights) and then lowers the vessel down checking the bottom-ground distance.

It also supports Hangar's anchors and vessels, moored to the ground with KAS Harpoons.

 

Links to youtube videos (by Fredrik Wolf)

Typical buggy behavior     

Stabilized by mod

 

Source and mod files on GitHub:
Impudently called World Stabilizer

Licensed under MIT License

 

Kudos to @BahamutoD, @Papa_Joe and all participants of this thread for code pieces I pried into.

This is highly experimental mod, but I'd be grateful for test feedback. Just back up your saves as something might be blown up.

Edited by whale_2
link to public release
Link to comment
Share on other sites

Discovered some strange situation, where raycast from the bottom point of vessel does not hit the ground, but hits something beneath it. Added a workaround. And another one. 

Edited by whale_2
Link to comment
Share on other sites

Hey there @whale_2  This fix is interesting can't wait to try it out. 

Before you get jumped on by the Forum Admins I would suggest you add a licence to your work https://help.github.com/articles/adding-a-license-to-a-repository/

Also since you borrowed some code from VesselMover it's appropriate to include the original licence as there is chain of credit for this as well -https://github.com/PapaJoesSoup/VesselMover/blob/master/Distribution/GameData/VesselMover/License.txt

Link to comment
Share on other sites

2 hours ago, gomker said:

Hey there @whale_2  This fix is interesting can't wait to try it out. 

Before you get jumped on by the Forum Admins I would suggest you add a licence to your work https://help.github.com/articles/adding-a-license-to-a-repository/

Also since you borrowed some code from VesselMover it's appropriate to include the original licence as there is chain of credit for this as well -https://github.com/PapaJoesSoup/VesselMover/blob/master/Distribution/GameData/VesselMover/License.txt

You're absolutely right. I just was so unsure would this work at all or not, so forgot about licensing stuff. Fixing now.

 

Link to comment
Share on other sites

4 minutes ago, TheKurgan said:

This looks VERY interesting!! With physics range extender, I often lose a vessel from the dreaded "jump"  or it falls through the not fully rendered terrain.

Do you think this mod will help with the extended physics range?

I didn't test it in that environment (but you could be first). If terrain is actually there so the game engine will allow to calculate correct altitude above the ground, it should work. 

Link to comment
Share on other sites

ok, so after some testing, it seems to work very well. 

I really like it, BUT the only thing I don't like about it is the fact that upon loading a vessel, the stabilization effect (lowering it to the ground) takes quite a long time. Comparing it to vessel mover, when you place a vessel, it takes about 3 times as long as that process.

Is there any way you can speed that up a little?

Link to comment
Share on other sites

Also, if there is a way to prevent it from doing it's thing, when there are launch clamps attached... or better yet, when the active vessel's mission time is still zero, that would be great.

 

 

Edited by TheKurgan
Link to comment
Share on other sites

10 hours ago, TheKurgan said:

ok, so after some testing, it seems to work very well. 

I really like it, BUT the only thing I don't like about it is the fact that upon loading a vessel, the stabilization effect (lowering it to the ground) takes quite a long time. Comparing it to vessel mover, when you place a vessel, it takes about 3 times as long as that process.

Is there any way you can speed that up a little?

I guess I'll add a config file so all parameters could be tweaked. Maybe even a config section later, if the official bugfix won't come any time soon. Excluding vessels with launch clamps makes perfect sense, but not zero mission time (prelaunch state), because some aircraft still jump wildly when launced from SPH. (Or this could be a configuration option as well)

Edited by whale_2
Link to comment
Share on other sites

9 hours ago, whale_2 said:

this could be a configuration option as well

That would be awesome!! I very rarely get that jump on launch. But if the lowering effect was a little faster, it wouldn't make a difference. I just find it takes too long when the vessel is first launched, before it touches the runway.

Link to comment
Share on other sites

On 12/15/2017 at 8:54 PM, TheKurgan said:

That would be awesome!! I very rarely get that jump on launch. But if the lowering effect was a little faster, it wouldn't make a difference. I just find it takes too long when the vessel is first launched, before it touches the runway.

I've rolled out 0.6 with config file where you can tweak timers and different heights. Vessels on launch clamp are not touched, as well as flags and kerbals. There's also vessel exclusion list.

Altitude detection system reworked.

Latest version didn't blow up any vessel in my save, but I still can't guarantee it won't blow up something in yours.

 

On 12/16/2017 at 4:22 AM, Murdabenne said:

Any idea if/when Squad will patch this?

No idea. According to bugtracker this is the only critical confirmed bug of 1.3.1, but they're working on 1.4 which will use newer Unity and this could have some consequences to all the mods. 

Link to comment
Share on other sites

Will you CKAN this at release?

Regardless thank you.  This is the thing that has caused the most frustration. Fixing it will save me so many reloads. 

On small planes I typically need three to five launches to get one that doesn't hop into the air and fall on its back or tail. So I very much appreciate the work.

Link to comment
Share on other sites

11 minutes ago, Bornholio said:

Will you CKAN this at release?

Regardless thank you.  This is the thing that has caused the most frustration. Fixing it will save me so many reloads. 

On small planes I typically need three to five launches to get one that doesn't hop into the air and fall on its back or tail. So I very much appreciate the work.

For CKAN or for release in general there should be some more testing done. That's why I'm asking to check if this works in other people's saves - I can't anticipate all the possible situations.

Link to comment
Share on other sites

  • 3 weeks later...

It looks like it do very similar things as KJR, to easy down physics on switching scene/craft. IIRC, KJR use lowered gravity in first few physical ticks to prevent waking up kraken.
It might be possible that this fix step on KJR toe or vice versa, but have to try it to find out. In my latest career game I'm just about to start sending heavier crafts/stations to Mun/Minimus. I will try to use this bugfix as soon as I come across with jumping ships, to see if there is conflict somewhere and if this bugfix solved it properly.

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