From cb0937c8b6e13e2c911a4b049776d92356d0b0a9 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Fri, 30 Oct 2020 01:05:28 +0100 Subject: [PATCH] Add pulling rotating the pulled entity (#2449) --- Content.Shared/Physics/Pull/PullController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Shared/Physics/Pull/PullController.cs b/Content.Shared/Physics/Pull/PullController.cs index b34b571dcc..5ad3dff9df 100644 --- a/Content.Shared/Physics/Pull/PullController.cs +++ b/Content.Shared/Physics/Pull/PullController.cs @@ -256,6 +256,12 @@ namespace Content.Shared.Physics.Pull { MovingTo = null; } + + if (LinearVelocity != Vector2.Zero) + { + var angle = LinearVelocity.ToAngle(); + ControlledComponent.Owner.Transform.LocalRotation = angle; + } } } }