Adjust start position of camera (for initial camera movement) properly,

which especially fixes its position in reverse mode.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10851 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2012-02-15 05:27:27 +00:00
parent 94be2cfec2
commit 15445f182c

View File

@ -256,8 +256,9 @@ void Camera::reset()
*/
void Camera::setInitialTransform()
{
m_camera->setPosition( m_kart->getXYZ().toIrrVector()
+ core::vector3df(0, 25, -50) );
Vec3 start_offset(0, 25, -50);
Vec3 xx = m_kart->getTrans()(start_offset);
m_camera->setPosition( xx.toIrrVector());
// Reset the target from the previous target (in case of a restart
// of a race) - otherwise the camera will initially point in the wrong
// direction till smoothMoveCamera has corrected this. Setting target