From c1d62e5e377d3523b649db5e226b2bfb336ab501 Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 23 May 2020 12:50:55 +0200 Subject: [PATCH] Add Pitch/Yaw Vector Fix --- FightSystem_API/src/de/steamwar/fightsystem/Config.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FightSystem_API/src/de/steamwar/fightsystem/Config.java b/FightSystem_API/src/de/steamwar/fightsystem/Config.java index 0464811..5e53d69 100644 --- a/FightSystem_API/src/de/steamwar/fightsystem/Config.java +++ b/FightSystem_API/src/de/steamwar/fightsystem/Config.java @@ -268,14 +268,14 @@ public class Config { Vector v1 = TeamBlueSpawn.toVector().subtract(TeamRedSpawn.toVector()); double pitch = Math.toDegrees(v1.angle(v1.clone().setY(0))); - double yaw = Math.toDegrees(v1.clone().setY(0).angle(new Vector(0, 0, -1))); + double yaw = Math.toDegrees(v1.clone().setY(0).angle(new Vector(0, 0, 1))); double pitchInverted = pitch * -1; double yawInverted = yaw + 180; - TeamBlueSpawn.setYaw((float) yaw); + TeamBlueSpawn.setYaw((float) yawInverted); TeamBlueSpawn.setPitch((float) pitch); - TeamRedSpawn.setYaw((float) yawInverted); + TeamRedSpawn.setYaw((float) yaw); TeamRedSpawn.setPitch((float) pitchInverted); SpecSpawn = new Location(world,