Improved rotation animation

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4175 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-10-31 00:43:05 +00:00
parent a4bf6a4228
commit e169cdce88

View File

@ -109,9 +109,9 @@ void ModelViewWidget::update(float delta)
}
// slow down when getting close
if (fabsf(angle - m_rotation_target) < m_rotation_speed*5.0f)
if (fabsf(angle - m_rotation_target) < m_rotation_speed*7.0f && fabsf(angle - m_rotation_target) > m_rotation_speed*2.0f)
{
m_rotation_speed = std::max(m_rotation_speed*0.9f, fabsf(angle - m_rotation_target));
m_rotation_speed = std::max(m_rotation_speed*0.9f, 25.0f);
}
// stop rotating when target reached