Skip to content

Commit

Permalink
Fix incorrect vessel localCom when root part is not the control point
Browse files Browse the repository at this point in the history
-most notably this caused the camera to be anchored to the wrong place
  • Loading branch information
JonnyOThan committed Oct 7, 2024
1 parent 1f7acfd commit ceea128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion KSPCommunityFixes/Performance/FlightPerf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static bool VesselPrecalculate_CalculatePhysicsStats_Prefix(VesselPrecal
vessel.rb_velocityD = velocity * vesselMassRecip;
vessel.velocityD = vessel.rb_velocityD + Krakensbane.GetFrameVelocity();
vessel.CoM = vessel.CoMD;
vessel.localCoM = vesselInverseMatrix.MultiplyPoint3x4(vessel.CoMD);
vessel.localCoM = vessel.vesselTransform.InverseTransformPoint(vessel.CoM);
vessel.rb_velocity = vessel.rb_velocityD;
vessel.angularVelocityD = angularVelocity * vesselMassRecip;
vessel.angularVelocity = vessel.angularVelocityD;
Expand Down

0 comments on commit ceea128

Please sign in to comment.