From e8cb873f083fae12f485785d55aea8b5a68e831c Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Sun, 29 Jan 2017 21:37:58 -0500 Subject: [PATCH] Finish smoothing the kart rotation --- src/graphics/camera_normal.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/graphics/camera_normal.cpp b/src/graphics/camera_normal.cpp index 35851820f..5164d65da 100644 --- a/src/graphics/camera_normal.cpp +++ b/src/graphics/camera_normal.cpp @@ -122,10 +122,7 @@ void CameraNormal::smoothMoveCamera(float dt) btTransform btt = m_kart->getTrans(); m_kart_position = m_kart_position + (btt.getOrigin() - m_kart_position) * delta2; - - // TODO - //m_kart_rotation = m_kart_rotation.slerp(btt.getRotation(), delta2); - m_kart_rotation = btt.getRotation(); + m_kart_rotation = m_kart_rotation.normalized().slerp(btt.getRotation().normalized(), delta2); btt.setOrigin(m_kart_position); btt.setRotation(m_kart_rotation);