diff --git a/Content.Shared/Movement/SharedMoverController.cs b/Content.Shared/Movement/SharedMoverController.cs index acfde3f0b8..735d5ff559 100644 --- a/Content.Shared/Movement/SharedMoverController.cs +++ b/Content.Shared/Movement/SharedMoverController.cs @@ -118,6 +118,7 @@ namespace Content.Shared.Movement { if (transform.GridID != GridId.Invalid) mover.LastGridAngle = transform.Parent!.WorldRotation; + transform.WorldRotation = physicsComponent.LinearVelocity.GetDir().ToAngle(); return; } @@ -128,7 +129,9 @@ namespace Content.Shared.Movement // This is relative to the map / grid we're on. var total = walkDir * mover.CurrentWalkSpeed + sprintDir * mover.CurrentSprintSpeed; - var worldTotal = _relativeMovement ? transform.Parent!.WorldRotation.RotateVec(total) : total; + var parentRotation = transform.Parent!.WorldRotation; + + var worldTotal = _relativeMovement ? parentRotation.RotateVec(total) : total; DebugTools.Assert(MathHelper.CloseToPercent(total.Length, worldTotal.Length)); @@ -138,7 +141,7 @@ namespace Content.Shared.Movement if (transform.GridID == GridId.Invalid) worldTotal = mover.LastGridAngle.RotateVec(worldTotal); else - mover.LastGridAngle = transform.Parent!.WorldRotation; + mover.LastGridAngle = parentRotation; if (worldTotal != Vector2.Zero) {