Fixes all the rotation bugs. (#3365)

This commit is contained in:
Pieter-Jan Briers
2021-02-22 00:46:27 +01:00
committed by GitHub
parent 6d48154617
commit 63947a6d35
26 changed files with 9344 additions and 8545 deletions

View File

@@ -189,7 +189,7 @@ namespace Content.Server.GameObjects.Components.Mobs
var diff = targetWorldPos - player.Transform.WorldPosition;
if (diff.LengthSquared > 0.01f)
{
player.Transform.LocalRotation = new Angle(diff);
player.Transform.LocalRotation = Angle.FromWorldVec(diff);
}
return true;