fix: correct chat bubble Y-coordinate projection

The camera bakes the Vulkan Y-flip into the projection matrix, so no
extra Y-inversion is needed when converting NDC to screen pixels. This
matches the convention used by the nameplate and minimap marker code.
The old formula double-flipped Y, causing chat bubbles to appear at
mirrored positions (e.g. below characters instead of above their heads).
This commit is contained in:
Kelsi 2026-03-12 07:10:45 -07:00
parent 17022b9b40
commit 8858edde05

View file

@ -13748,7 +13748,9 @@ void GameScreen::renderChatBubbles(game::GameHandler& gameHandler) {
glm::vec2 ndc(clipPos.x / clipPos.w, clipPos.y / clipPos.w); glm::vec2 ndc(clipPos.x / clipPos.w, clipPos.y / clipPos.w);
float screenX = (ndc.x * 0.5f + 0.5f) * screenW; float screenX = (ndc.x * 0.5f + 0.5f) * screenW;
float screenY = (1.0f - (ndc.y * 0.5f + 0.5f)) * screenH; // Flip Y // Camera bakes the Vulkan Y-flip into the projection matrix:
// NDC y=-1 is top, y=1 is bottom — same convention as nameplate/minimap projection.
float screenY = (ndc.y * 0.5f + 0.5f) * screenH;
// Skip if off-screen // Skip if off-screen
if (screenX < -200.0f || screenX > screenW + 200.0f || if (screenX < -200.0f || screenX > screenW + 200.0f ||