Changed: #1469 Remembering view and viewPos at the start of a step only

--HG--
branch : gsoc2012-fabien
hg/feature/gsoc2012-fabien
Fabien_HENON 12 years ago
parent 46a64b06b5
commit bd69090057

@ -111,6 +111,10 @@ void CCameraAnimationPlayer::playStep(const std::string& stepName, NLMISC::CBitM
}
_ElapsedTimeForCurrStep = 0.f;
// We get the current camera information
_StartStepCamLookAtDir = View.currentView();
_StartStepCamPos = View.currentViewPos();
}
bool CCameraAnimationPlayer::isPlaying()
@ -120,14 +124,10 @@ bool CCameraAnimationPlayer::isPlaying()
TCameraAnimationInfo CCameraAnimationPlayer::update()
{
// We get the current camera information
NLMISC::CVector camLookAtDir = View.currentView();
NLMISC::CVector camPos = View.currentViewPos();
// We update the elapsed time for this step
_ElapsedTimeForCurrStep += DT;
TCameraAnimationInfo currCamInfo(camPos, camLookAtDir, _ElapsedTimeForCurrStep);
TCameraAnimationInfo currCamInfo(_StartStepCamLookAtDir, _StartStepCamPos, _ElapsedTimeForCurrStep);
if (!isPlaying())
return currCamInfo;

@ -91,6 +91,9 @@ private:
NLMISC::CVector _LastViewPos;
CUserControls::TMoveMode _LastMode;
bool _HasLastViewInfo;
NLMISC::CVector _StartStepCamLookAtDir;
NLMISC::CVector _StartStepCamPos;
};

Loading…
Cancel
Save