From e169cdce8859aa3079fb6c641379ae031da9197b Mon Sep 17 00:00:00 2001 From: auria Date: Sat, 31 Oct 2009 00:43:05 +0000 Subject: [PATCH] Improved rotation animation git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4175 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/widgets/model_view_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guiengine/widgets/model_view_widget.cpp b/src/guiengine/widgets/model_view_widget.cpp index 2c346cdc3..fb0c8d0e7 100644 --- a/src/guiengine/widgets/model_view_widget.cpp +++ b/src/guiengine/widgets/model_view_widget.cpp @@ -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