Experimentally adjust camera up vector depending on kart roll, which means

the camera will now follow the gravity changes.
This commit is contained in:
hiker 2014-02-18 08:18:33 +11:00
parent a34d47d72a
commit 23301d822a

View File

@ -534,6 +534,9 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
}
}
// Rotate the up vector (0,1,0) by the rotation ... which is just column 1
Vec3 up = m_kart->getTrans().getBasis().getColumn(1);
m_camera->setUpVector(up.toIrrVector());
} // positionCamera
// ----------------------------------------------------------------------------