mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
point defense turrets face their targets correctly
This commit is contained in:
+1
-1
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user