From dbce5c88ffb7954658a1e3d4cf78a15c4e50c9c4 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 27 Sep 2022 23:28:37 -0700 Subject: [PATCH] Keep collidable items from getting stuck at conveyor corners (#11508) --- Content.Server/Physics/Controllers/ConveyorController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Physics/Controllers/ConveyorController.cs b/Content.Server/Physics/Controllers/ConveyorController.cs index 0574c9d62a..bbd924ca2f 100644 --- a/Content.Server/Physics/Controllers/ConveyorController.cs +++ b/Content.Server/Physics/Controllers/ConveyorController.cs @@ -219,7 +219,10 @@ namespace Content.Server.Physics.Controllers } else { - var velocity = r.Normalized * speed; + // Give a slight nudge in the direction of the conveyor to prevent + // to collidable objects (e.g. crates) on the locker from getting stuck + // pushing each other when rounding a corner. + var velocity = (r + direction*0.2f).Normalized * speed; return velocity * frameTime; } }