Experimentally adjust camera up vector depending on kart roll, which means
the camera will now follow the gravity changes.
This commit is contained in:
parent
a34d47d72a
commit
23301d822a
@ -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
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user