Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion FreeIva/FreeIva.cs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,15 @@ internal static Vector3 GetFlightAccelerationInternalSpace(Part part, Vector3 in

if (magnitude <= 0.01f)
{
return Vector3.zero;
if (FlightGlobals.ActiveVessel.LandedOrSplashed) //In this event, we can safely assume surface gravity will be applied, since the base is landed. This allows for support for packed bases like in PhysicsHold mod.
{
accelWorldSpace = Vector3.MoveTowards(Vector3.zero, FlightGlobals.currentMainBody.position, (float)(FlightGlobals.currentMainBody.gravParameter / (double)(Vector3.Distance(InternalSpace.InternalToWorld(internalSpacePosition), FlightGlobals.currentMainBody.position) * Vector3.Distance(InternalSpace.InternalToWorld(internalSpacePosition), FlightGlobals.currentMainBody.position))));
magnitude = vector.magnitude;
}
else
{
return Vector3.zero;
}
}

return WorldDirectionToInternal(accelWorldSpace) * magnitude;
Expand Down