From aebb01b405a4d9063b55d0b0e72bf050bcb08411 Mon Sep 17 00:00:00 2001 From: Manish Date: Tue, 4 Jun 2019 15:19:44 +0200 Subject: [PATCH] fixed pedestrian orientation --- LibCarla/source/carla/nav/Navigation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibCarla/source/carla/nav/Navigation.cpp b/LibCarla/source/carla/nav/Navigation.cpp index 64bea303a..95b05ce99 100644 --- a/LibCarla/source/carla/nav/Navigation.cpp +++ b/LibCarla/source/carla/nav/Navigation.cpp @@ -409,7 +409,7 @@ namespace nav { trans.location.z = agent->npos[1] + AGENT_HEIGHT_HALF; // set its rotation trans.rotation.pitch = 0; - trans.rotation.yaw = atan(agent->vel[2] / agent->vel[0]) * (180.0f / 3.14159265f); + trans.rotation.yaw = atan2f(agent->vel[2] , agent->vel[0]) * (180.0f / 3.14159265f); trans.rotation.roll = 0; return true;