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
This commit is contained in:
parent
ce3578d1c1
commit
7ef21a38ed
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user