Jump to content

Robotic parts cause crafts to bend out of shape more and more on every save/load cycle, and I think I know why


Recommended Posts

I built my first craft with robotic parts a few days ago: an electric plane to explore Eve, with two counterrotating propellers on the front and the back.

This was fun to fly, at the beginning. Then I noticed it was getting harder to keep in level flight, and so I started investigating. And I found out why.

Every time the crafts gets saved and reloaded (it doesn't have to be F5/F9, it can be just switching to KSC or another distant vessel, and back), the parts that have a robotic servo between them and the root part move a little.

Thanks to my modding experience, I found out what happens.

A KSP craft is made of many parts. Their position respect to the root part is stored in the orgPos and orgRot Part properties, and defines the "pristine" craft configuration, as it was built in the editor: when you launch the craft, its parts appear in their "pristine" position. Then external forces (i.e. gravity) bend the craft a bit, because when in flight all parts behave as if they're connected by springs. If you save and reload, though, the craft is recreated using the "pristine" part positions, and they didn't change while in flight, so the craft will not accumulate the "bending" over save/reload cycles.

But if there's a robotic part in the craft, some parts may have to change their "pristine" position: if for instance you extend a piston, all the parts moved by the piston change their position respect to the root part, and this must be updated in the "pristine" position information, so that if you save & reload the moved parts will reappear where the piston moved them, and not where they were at launch.

It looks like KSP updates the "pristine" part position according to the "real" position (i.e. bent by gravity or other forces). This adds up over time, and you find your craft more and more out of shape, until it gets practically unflyable.

I checked it with a little part module that can log the "pristine" and "real" position of parts, and the "real" position gets systematically copied to the "pristine" position at every save.

This problem doesn't get mentioned a lot. I found no reports in the bug tracker, and only this in the forum:

@SQUAD, are you working on this? It could be probably be fixed with a mod, but it wouldn't be easy. Anyway, I'll file a bug soon™.

 

Link to comment
Share on other sites

@peteletroll Great post about this issue. If that is the cause of the problem maybe its an easy fix for Squad?

My bug report on this issue recently:

https://bugs.kerbalspaceprogram.com/issues/25841

The following bug report is from a year ago:

https://bugs.kerbalspaceprogram.com/issues/22928

#22928 was set to Acknowledged and then it seems like nothing will be done about it.

 

I have been doing a lot more robotics recently, the following video shows my forklift being reintegrated into a shipping container:

Two issues happen from the robotics/parts moving out of position (from scene changes):

1. The Forklift becomes less and less useful because the pistons move down from the original point towards the ground until they are hitting the ground when under load (they drag across the ground)

2. The reintegration needs to pull the wheels off of the ground near the end because the wheels start shaking, but it will eventually end up on the ground shaking again because the docking port that is in contact with the middle large piston is moving a little each time.

Current Work Around: Keep crafts in orbit for scene changes because there's no gravity.

 

EJ_SA (biggest current KSP streamer on twitch) has had major issues with this. He calls it drifting. 

Hes making really complicated crafts for his current career save that hes doing. Hes been trying different things to try counter the issue and realign his custom launch pads.

 

@technicalfool or @Maxsimal Is there anyway this can be revisited? #22928 was set to Acknowledged and then nothing was done about it.

There's a large push for reusuability in real space flight right now that robotics has lacking the ability to do because of this problem.

 

 

Link to comment
Share on other sites

Oh. I see why the bug report was ignored/acknowledged now. the duplicate attached was rather aggressive.

I feel his frustration but personal experience (more recent than one would think) has shown that handling life situations in that way doesn't get the response one would think.

Link to comment
Share on other sites

  • 4 months later...
On 7/24/2020 at 9:53 AM, peteletroll said:

I built my first craft with robotic parts a few days ago: an electric plane to explore Eve, with two counterrotating propellers on the front and the back.

This was fun to fly, at the beginning. Then I noticed it was getting harder to keep in level flight, and so I started investigating. And I found out why.

Every time the crafts gets saved and reloaded (it doesn't have to be F5/F9, it can be just switching to KSC or another distant vessel, and back), the parts that have a robotic servo between them and the root part move a little.

Thanks to my modding experience, I found out what happens.

A KSP craft is made of many parts. Their position respect to the root part is stored in the orgPos and orgRot Part properties, and defines the "pristine" craft configuration, as it was built in the editor: when you launch the craft, its parts appear in their "pristine" position. Then external forces (i.e. gravity) bend the craft a bit, because when in flight all parts behave as if they're connected by springs. If you save and reload, though, the craft is recreated using the "pristine" part positions, and they didn't change while in flight, so the craft will not accumulate the "bending" over save/reload cycles.

But if there's a robotic part in the craft, some parts may have to change their "pristine" position: if for instance you extend a piston, all the parts moved by the piston change their position respect to the root part, and this must be updated in the "pristine" position information, so that if you save & reload the moved parts will reappear where the piston moved them, and not where they were at launch.

It looks like KSP updates the "pristine" part position according to the "real" position (i.e. bent by gravity or other forces). This adds up over time, and you find your craft more and more out of shape, until it gets practically unflyable.

I checked it with a little part module that can log the "pristine" and "real" position of parts, and the "real" position gets systematically copied to the "pristine" position at every save.

This problem doesn't get mentioned a lot. I found no reports in the bug tracker, and only this in the forum:

@SQUAD, are you working on this? It could be probably be fixed with a mod, but it wouldn't be easy. Anyway, I'll file a bug soon™.

 

A mod could solve it, but not for us console players

Link to comment
Share on other sites

  • 1 year later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.
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...