From 63b68b3a55a11b32b07e7b8bdbf3760722d5e7f9 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 27 Jun 2023 00:42:07 +1000 Subject: Nameplate and chat bubble improvements They should stack much better now. I also hooked up the true mouth position to the name-tag, but it's too shaky on chat bubbles. --- source/frontend/StarNameplatePainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/frontend/StarNameplatePainter.cpp') diff --git a/source/frontend/StarNameplatePainter.cpp b/source/frontend/StarNameplatePainter.cpp index d7e589a..0bc96ff 100644 --- a/source/frontend/StarNameplatePainter.cpp +++ b/source/frontend/StarNameplatePainter.cpp @@ -53,7 +53,7 @@ void NameplatePainter::update(WorldClientPtr const& world, WorldCamera const& ca m_nametags.forEach([&world, &camera, this, inspectionMode](BubbleState& bubbleState, Nametag& nametag) { if (auto entity = as(world->entity(nametag.entityId))) { - bubbleState.idealDestination = camera.worldToScreen(entity->position()) + m_offset * camera.pixelRatio(); + bubbleState.idealDestination = camera.worldToScreen(entity->nametagOrigin()) + m_offset * camera.pixelRatio(); bubbleState.boundBox = determineBoundBox(bubbleState.idealDestination, nametag); nametag.statusText = entity->statusText(); -- cgit v1.2.3