Skip to content

Commit

Permalink
No auto sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
pleroy committed Nov 20, 2023
1 parent 91ee012 commit 98bd3a6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ksp_plugin_adapter/ksp_plugin_adapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,8 +1152,8 @@ private System.Collections.IEnumerator WaitedForFixedUpdate() {
yield break;
}

// We are not changing the |Transform|s, but if we don't disable auto-
// sync the profiles show |SyncColliderTransform|.
// We are going to touch plenty of |Transform|s, so we will prevent
// Unity from syncing with the physics system all the time.
UnityEngine.Physics.autoSyncTransforms = false;

double Δt = Planetarium.TimeScale * Planetarium.fetch.fixedDeltaTime;
Expand Down Expand Up @@ -1437,10 +1437,6 @@ private System.Collections.IEnumerator WaitedForFixedUpdate() {
if (has_active_manageable_vessel() &&
!FlightGlobals.ActiveVessel.packed &&
plugin_.HasVessel(FlightGlobals.ActiveVessel.id.ToString())) {
// We are going to touch plenty of |Transform|s, so we will prevent
// Unity from syncing with the physics system all the time.
UnityEngine.Physics.autoSyncTransforms = false;

Vector3d q_correction_at_root_part = Vector3d.zero;
Vector3d v_correction_at_root_part = Vector3d.zero;
CelestialBody main_body = FlightGlobals.ActiveVessel.mainBody;
Expand Down

0 comments on commit 98bd3a6

Please sign in to comment.