Fixed bugs in the computation of the rotation angle for the referee
so that it faces the kart. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9900 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d3276d0adf
commit
0a043b57b8
@ -92,10 +92,10 @@ 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(),
|
||||
float angle_to_kart = atan2(m_st_start_offset.getX(),
|
||||
m_st_start_offset.getZ())
|
||||
* RAD_TO_DEGREE;
|
||||
m_st_start_rotation.setY(m_st_start_rotation.getY()-angle_to_kart);
|
||||
m_st_start_rotation.setY(m_st_start_rotation.getY()+angle_to_kart);
|
||||
|
||||
std::vector<std::string> colors;
|
||||
node->get("colors", &colors);
|
||||
|
Loading…
Reference in New Issue
Block a user