You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is caused by the Part.VesselModified() callback for GameEvents.onVesselWasModified calling Part.CycleAutoStrut() for all parts on the vessel.
Cycling autostruts mean all autostruts joints are immediately destroyed, and a coroutine is set to rebuild them in the next FixedUpdate.
This mean all autostruts joints on the vessel will be created anew, using the current in-physics part positions, essentially "freezing" any current deformation in place.
Note that GameEvents.onVesselWasModified is called by other things, meaning that issue can also happen in a variety of other cases : part destruction, docking/undocking, jettisoning fairings, breaking antennas/solar panels, and likely other cases from various mods.
Conclusion and fix
While this is a relatively minor issue (since the deformation is temporary and reversible), this might be a major root cause of the perceived quirkiness of autostruts. Autostruts joints essentially "freeze" the parts in a non-pristine position, and beside the vessel deformation issue, this mean autostrut joints are fighting against the regular joints, leading to more instability in the overall physic/rigidbody simulation. To some extent, it is also an aggravating factor for BG robotics drift (see #13) since robotics override the original part positions based on the current in-physics deformation.
The implemented fix runs just after the autostrut joint (re)creation logic and :
Alter the joint anchor to target the original pristine part position.
Add a rotation offset to the joint, compensating the difference between the part current in-physics rotation and the original pristine rotation.
Fix shortcomings
The patch doesn't handle the case of autostruts targeting BG robotic parts, as in that case the joint target is the moving rigidbody for which a pristine pos/rot doesn't exists. These autostruts are untouched and follow stock behavior.
The patch should be relatively safe from a modding ecosystem perspective, but it might fundamentally conflict with other robotic implementation such as USI Construction or Infernal Robotics, some testing is needed
Reproduction pics :
The text was updated successfully, but these errors were encountered:
- New bugfix : AutoStrutDrift, see [issue #21](#21).
- New bugfix : PartStartStability, see [issue #9](#9).
- The FlightSceneLoadKraken patch is superseded by the PartStartStability patch, which is now disabled by default
Steps to reproduce :
Extra info :
Root cause :
This is caused by the
Part.VesselModified()
callback forGameEvents.onVesselWasModified
callingPart.CycleAutoStrut()
for all parts on the vessel.Cycling autostruts mean all autostruts joints are immediately destroyed, and a coroutine is set to rebuild them in the next FixedUpdate.
This mean all autostruts joints on the vessel will be created anew, using the current in-physics part positions, essentially "freezing" any current deformation in place.
Note that
GameEvents.onVesselWasModified
is called by other things, meaning that issue can also happen in a variety of other cases : part destruction, docking/undocking, jettisoning fairings, breaking antennas/solar panels, and likely other cases from various mods.Conclusion and fix
While this is a relatively minor issue (since the deformation is temporary and reversible), this might be a major root cause of the perceived quirkiness of autostruts. Autostruts joints essentially "freeze" the parts in a non-pristine position, and beside the vessel deformation issue, this mean autostrut joints are fighting against the regular joints, leading to more instability in the overall physic/rigidbody simulation. To some extent, it is also an aggravating factor for BG robotics drift (see #13) since robotics override the original part positions based on the current in-physics deformation.
The implemented fix runs just after the autostrut joint (re)creation logic and :
Fix shortcomings
The patch doesn't handle the case of autostruts targeting BG robotic parts, as in that case the joint target is the moving rigidbody for which a pristine pos/rot doesn't exists. These autostruts are untouched and follow stock behavior.
The patch should be relatively safe from a modding ecosystem perspective, but it might fundamentally conflict with other robotic implementation such as USI Construction or Infernal Robotics, some testing is needed
Reproduction pics :
The text was updated successfully, but these errors were encountered: