Browse Source

Fix ground offset for selection rings and flags

Co-authored-by: djeada <[email protected]>
copilot-swe-agent[bot] 2 months ago
parent
commit
13739a77aa
3 changed files with 5 additions and 5 deletions
  1. 1 1
      render/entity/archer_renderer.cpp
  2. 1 1
      render/entity/arrow_vfx_renderer.cpp
  3. 3 3
      render/geom/flag.cpp

+ 1 - 1
render/entity/archer_renderer.cpp

@@ -410,7 +410,7 @@ static inline void drawSelectionFX(const DrawContext &p, ISubmitter &out) {
   if (p.selected || p.hovered) {
     QMatrix4x4 ringM;
     QVector3D pos = p.model.column(3).toVector3D();
-    ringM.translate(pos.x(), 0.01f, pos.z());
+    ringM.translate(pos.x(), 0.15f, pos.z());
     ringM.scale(0.5f, 1.0f, 0.5f);
     if (p.selected)
       out.selectionRing(ringM, 0.6f, 0.25f, QVector3D(0.2f, 0.8f, 0.2f));

+ 1 - 1
render/entity/arrow_vfx_renderer.cpp

@@ -379,7 +379,7 @@ static inline void drawSelectionFX(const DrawContext &p, ISubmitter &out) {
   if (p.selected || p.hovered) {
     QMatrix4x4 ringM;
     QVector3D pos = p.model.column(3).toVector3D();
-    ringM.translate(pos.x(), 0.01f, pos.z());
+    ringM.translate(pos.x(), 0.15f, pos.z());
     ringM.scale(0.5f, 1.0f, 0.5f);
     if (p.selected)
       out.selectionRing(ringM, 0.6f, 0.25f, QVector3D(0.2f, 0.8f, 0.2f));

+ 3 - 3
render/geom/flag.cpp

@@ -15,16 +15,16 @@ Flag::FlagMatrices Flag::create(float worldX, float worldZ,
   result.poleColor = poleColor;
 
   result.pole = kIdentityMatrix;
-  result.pole.translate(worldX, (0.15f + 0.02f) * scale, worldZ);
+  result.pole.translate(worldX, (0.15f + 0.15f) * scale, worldZ);
   result.pole.scale(0.03f * scale, 0.30f * scale, 0.03f * scale);
 
   result.pennant = kIdentityMatrix;
-  result.pennant.translate(worldX + 0.10f * scale, (0.25f + 0.02f) * scale,
+  result.pennant.translate(worldX + 0.10f * scale, (0.25f + 0.15f) * scale,
                            worldZ);
   result.pennant.scale(0.18f * scale, 0.12f * scale, 0.02f * scale);
 
   result.finial = kIdentityMatrix;
-  result.finial.translate(worldX, (0.32f + 0.02f) * scale, worldZ);
+  result.finial.translate(worldX, (0.32f + 0.15f) * scale, worldZ);
   result.finial.scale(0.05f * scale, 0.05f * scale, 0.05f * scale);
 
   return result;