Browse Source

render intersection point coords as text

Kajetan Johannes Hammerle 3 years ago
parent
commit
92c3fb30e8
1 changed files with 4 additions and 2 deletions
  1. 4 2
      client/Game.cpp

+ 4 - 2
client/Game.cpp

@@ -283,13 +283,15 @@ void Game::renderTextOverlay(float lag, Renderer& renderer, FontRenderer& fr) co
     String s;
     fr.drawString(10, 10, s.append("FPS: ").append(fps.getUpdatesPerSecond()).append(" TPS: ").append(tps.getUpdatesPerSecond()));
     fr.drawString(10, 19, s.clear().append("Speed: ").append(moveSpeed));
+    Vector3 inter = kdTree.getIntersection();
+    fr.drawString(10, 29, s.clear().append("Intersection: (").append(inter[0]).append(", ").append(inter[1]).append(", ").append(inter[2]).append(")"));
     s.clear();
     s += pos;
-    fr.drawString(10, 28, s);
+    fr.drawString(10, 38, s);
     for(uint i = 0; i < cameraPoints.getLength(); i++) {
         s.clear().append(i + 1).append(": ");
         s += cameraPoints[i].pos;
-        fr.drawString(10, i * 9 + 37, s);
+        fr.drawString(10, i * 9 + 47, s);
     }
 }