From 7ef21a38ed8b75dba3e37a6dc10f37326ca95ef8 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 11 Mar 2010 23:23:15 +0000 Subject: [PATCH] Fixed camera rotation. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/switch_coordinate_system@4984 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/graphics/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics/camera.cpp b/src/graphics/camera.cpp index cefcd1cb6..1c87b4673 100644 --- a/src/graphics/camera.cpp +++ b/src/graphics/camera.cpp @@ -260,7 +260,7 @@ void Camera::computeNormalCameraPosition(Vec3 *wanted_position, // quadratically to dampen small variations (but keep sign) float dampened_steer = fabsf(steering) * steering; float angle_around = m_kart->getHeading() - - m_rotation_range * dampened_steer * 0.5f; + + m_rotation_range * dampened_steer * 0.5f; float angle_up = m_kart->getPitch() + 30.0f*DEGREE_TO_RAD; wanted_position->setX(-sin(angle_around)); @@ -293,7 +293,7 @@ void Camera::update(float dt) { wanted_target.setY(wanted_target.getY()+ 0.75f); float angle_around = m_kart->getHeading() - - m_rotation_range * m_kart->getSteerPercent() + + m_rotation_range * m_kart->getSteerPercent() * m_kart->getSkidding(); float angle_up = m_kart->getPitch() + 30.0f*DEGREE_TO_RAD; wanted_position.setX( sin(angle_around));