* Level: Implement findPath with PathFinder now.

This commit is contained in:
iProgramInCpp
2023-12-06 14:13:10 +02:00
parent cd7acc8bd7
commit 8602de2428
6 changed files with 42 additions and 26 deletions

View File

@@ -10,8 +10,8 @@
float Node::distanceTo(Node* node)
{
float dx = node->m_x - m_x;
float dy = node->m_y - m_y;
float dz = node->m_z - m_z;
float dx = float(node->m_x) - float(m_x);
float dy = float(node->m_y) - float(m_y);
float dz = float(node->m_z) - float(m_z);
return Mth::sqrt(dx * dx + dy * dy + dz * dz);
}