diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/waypoint/AzimuthWaypoint.java b/core/src/main/java/org/geysermc/geyser/session/cache/waypoint/AzimuthWaypoint.java index 2f44a4894..c4a956437 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/waypoint/AzimuthWaypoint.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/waypoint/AzimuthWaypoint.java @@ -68,8 +68,9 @@ public class AzimuthWaypoint extends GeyserWaypoint implements TickingWaypoint { private void updatePosition() { Vector3f playerPosition = session.getPlayerEntity().position(); // Unit circle math! - float dx = (float) (Math.cos(angle) * WAYPOINT_DISTANCE); - float dz = (float) -(Math.sin(angle) * WAYPOINT_DISTANCE); + // Unintuitively, the delta x corresponds to the sin of the angle, and delta z to the cos + float dx = (float) -(Math.sin(angle) * WAYPOINT_DISTANCE); + float dz = (float) (Math.cos(angle) * WAYPOINT_DISTANCE); // Set Y to the player's Y since this waypoint always appears in the centre of the bar on Java position = Vector3f.from(playerPosition.getX() + dx, playerPosition.getY(), playerPosition.getZ() + dz); }