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:
@@ -224,12 +224,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
|
|
||||||
physComp.LinearVelocity = dirVec * spd;
|
physComp.LinearVelocity = dirVec * spd;
|
||||||
|
|
||||||
var wHomoDir = Vector3.UnitX;
|
transform.LocalRotation = new Angle(dirVec).GetCardinalDir().ToAngle();
|
||||||
|
|
||||||
transform.InvWorldMatrix.Transform(ref wHomoDir, out var lHomoDir);
|
|
||||||
|
|
||||||
lHomoDir.Normalize();
|
|
||||||
transform.LocalRotation = new Angle(lHomoDir.Xy);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user