From 6607e98ff55b95c340dc6010038f68ce1166e7bb Mon Sep 17 00:00:00 2001 From: hikerstk Date: Wed, 14 Sep 2011 06:35:27 +0000 Subject: [PATCH] Made the bird rotate a bit so that it is facing the kart (note - that does not solve the bug that if the kart is not at heading 0 the bird will face the wrong direction). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9830 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/graphics/referee.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/graphics/referee.cpp b/src/graphics/referee.cpp index 78af02aa1..5c6679455 100644 --- a/src/graphics/referee.cpp +++ b/src/graphics/referee.cpp @@ -79,6 +79,11 @@ void Referee::init() node->get("scale", &m_st_scale ); node->get("start-rotation", &m_st_start_rotation ); + float angle_to_kart = atan2(m_st_start_offset.getY(), + m_st_start_offset.getZ()) + * RAD_TO_DEGREE; + m_st_start_rotation.setY(m_st_start_rotation.getY()-angle_to_kart); + std::vector colors; node->get("colors", &colors);