Set heading correctly (esp. at startup, i.e. before first update
is called). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9831 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -89,6 +89,8 @@ void Moveable::reset()
|
||||
m_pitch = atan2(up.getZ(), fabsf(up.getY()));
|
||||
m_roll = atan2(up.getX(), up.getY());
|
||||
m_velocityLC = Vec3(0, 0, 0);
|
||||
Vec3 forw_vec = m_transform.getBasis().getColumn(0);
|
||||
m_heading = -atan2f(forw_vec.getZ(), forw_vec.getX());
|
||||
|
||||
} // reset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user