point defense turrets face their targets correctly

This commit is contained in:
devZoGok
2023-12-06 20:39:26 +02:00
parent 101bc04f78
commit 333ce91f12
+1 -1
View File
@@ -16,7 +16,7 @@ namespace battleship{
return;
}
float angleToTarg = targDir.getAngleBetween(turretDir);
float angleToTarg = targDir.norm().getAngleBetween(turretDir);
if(angleToTarg > .05)
rotateTurret(calculateRotation(targDir.norm(), angleToTarg, .1));