Keep collidable items from getting stuck at conveyor corners (#11508)

This commit is contained in:
Kevin Zheng
2022-09-27 23:28:37 -07:00
committed by GitHub
parent 415b0453c8
commit dbce5c88ff

View File

@@ -219,7 +219,10 @@ namespace Content.Server.Physics.Controllers
} }
else 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; return velocity * frameTime;
} }
} }