From 9bc606d96d58ab3d66ed9687765eae0bd2986302 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Fri, 13 Jul 2018 18:52:10 +0200 Subject: [PATCH] Fix data test `test_activities` Actually GoTo ignores z axis (up), It looks position which is targetted by character is some kind of hole or slope. --- tests/test_Character.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_Character.cpp b/tests/test_Character.cpp index cdbebc68..d52eafb6 100644 --- a/tests/test_Character.cpp +++ b/tests/test_Character.cpp @@ -51,8 +51,10 @@ BOOST_AUTO_TEST_CASE(test_activities) { Global::get().e->dynamicsWorld->stepSimulation(1.f / 60.f); } - BOOST_CHECK_LT( - glm::distance(character->getPosition(), {10.f, 10.f, 0.f}), 0.1f); + // Actually GoTo ignores z axis (up) + BOOST_CHECK_LT(glm::distance(glm::vec2{character->getPosition()}, + {10.f, 10.f}), + 0.1f); Global::get().e->destroyObject(character); }