Snap to nearest cardinal on traversal (#10869)

This commit is contained in:
metalgearsloth
2022-08-29 15:59:19 +10:00
committed by GitHub
parent fe177f4a3e
commit 3fa666bd06
54 changed files with 222 additions and 49 deletions

View File

@@ -202,7 +202,7 @@ namespace Content.Shared.Movement.Systems
var angleDiff = Angle.ShortestDistance(mover.RelativeRotation, mover.TargetRelativeRotation);
// if we've just traversed then lerp to our target rotation.
if (!angleDiff.EqualsApprox(Angle.Zero, 0.005))
if (!angleDiff.EqualsApprox(Angle.Zero, 0.001))
{
var adjustment = angleDiff * 5f * frameTime;
var minAdjustment = 0.005 * frameTime;