fixed pedestrian orientation

This commit is contained in:
Manish 2019-06-04 15:19:44 +02:00 committed by Néstor Subirón
parent 8138571ce8
commit aebb01b405
1 changed files with 1 additions and 1 deletions

View File

@ -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;