From c66554126db5f76745b17a7df3b69a4284b058a2 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Wed, 28 Oct 2026 06:58:59 +0100 Subject: [PATCH] Turn name tags to the camera in third-person front view Name tags faced the player's own look, so in the front view (F5 twice) every name and hologram read mirrored. They now face the camera, turned round in that view, like Camera.rotation(). --- crates/horizon-client/src/game/names.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/game/names.rs b/crates/horizon-client/src/game/names.rs index 3ecd2d245..4b6df3138 100644 --- a/crates/horizon-client/src/game/names.rs +++ b/crates/horizon-client/src/game/names.rs @@ -328,7 +328,15 @@ impl Game<'_> { ) { // Options.getBackgroundOpacity(0.25) black, as ARGB.color. const BACKGROUND: u32 = 0x3F00_0000; - let forward = glam::DVec3::from_array(view_vector(self.yaw, self.pitch)); + // The camera's facing (Camera.rotation()), turned round in third-person + // front view, so the text reads the right way from where it is seen. + let (view_yaw, view_pitch) = + if self.camera_type == super::perspective::CameraType::ThirdPersonFront { + (self.yaw + 180.0, -self.pitch) + } else { + (self.yaw, self.pitch) + }; + let forward = glam::DVec3::from_array(view_vector(view_yaw, view_pitch)); let right = forward.cross(glam::DVec3::Y).normalize_or_zero(); let up = right.cross(forward).normalize_or_zero(); let white = self.gui.atlas.font.white();