Fixes the direction humans turn to when throwing something (#686)

* Fixes the direction humans turn to when throwing something

* shorter
This commit is contained in:
Qustinnus
2020-02-13 16:21:29 +01:00
committed by GitHub
parent 934f6fb7e2
commit de094ddacc

View File

@@ -224,12 +224,7 @@ namespace Content.Server.GameObjects.EntitySystems
physComp.LinearVelocity = dirVec * spd;
var wHomoDir = Vector3.UnitX;
transform.InvWorldMatrix.Transform(ref wHomoDir, out var lHomoDir);
lHomoDir.Normalize();
transform.LocalRotation = new Angle(lHomoDir.Xy);
transform.LocalRotation = new Angle(dirVec).GetCardinalDir().ToAngle();
return true;
}