Move Navmesh code away from dPhysics (#701)

This commit is contained in:
Jett
2022-08-02 06:30:19 +01:00
committed by GitHub
parent a0aa8b2854
commit 9ee219ea42
13 changed files with 349 additions and 323 deletions

View File

@@ -733,7 +733,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
auto control = static_cast<ControllablePhysicsComponent*>(entity->GetComponent(COMPONENT_TYPE_CONTROLLABLE_PHYSICS));
if (!control) return;
float y = dpWorld::Instance().GetHeightAtPoint(control->GetPosition());
float y = dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(control->GetPosition());
std::u16string msg = u"Navmesh height: " + (GeneralUtils::to_u16string(y));
ChatPackets::SendSystemMessage(sysAddr, msg);
}