Fixed camera doing ugly moves when restarting race
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4836 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8e345671a9
commit
2945e55d89
@ -200,6 +200,7 @@ void Camera::reset()
|
||||
void Camera::setInitialTransform()
|
||||
{
|
||||
m_camera->setPosition( m_kart->getXYZ().toIrrVector() - core::vector3df(0, -25, 50) );
|
||||
m_camera->setRotation( core::vector3df( 0.0f, 0.0f, 0.0f ) );
|
||||
} // setInitialTransform
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -380,8 +380,12 @@ void Kart::reset()
|
||||
World::getWorld()->getPhysics()->addKart(this);
|
||||
}
|
||||
|
||||
if(m_camera)
|
||||
if (m_camera)
|
||||
{
|
||||
m_camera->reset();
|
||||
m_camera->setInitialTransform();
|
||||
}
|
||||
|
||||
// If the controller was replaced (e.g. replaced by end controller),
|
||||
// restore the original controller.
|
||||
if(m_saved_controller)
|
||||
|
Loading…
x
Reference in New Issue
Block a user