diff --git a/code/ryzom/client/src/camera_animation_manager/camera_animation_step_player_factory.cpp b/code/ryzom/client/src/camera_animation_manager/camera_animation_step_player_factory.cpp index f2957da43..c5c5c6db5 100644 --- a/code/ryzom/client/src/camera_animation_manager/camera_animation_step_player_factory.cpp +++ b/code/ryzom/client/src/camera_animation_manager/camera_animation_step_player_factory.cpp @@ -140,11 +140,8 @@ NLMISC::CVector ICameraAnimationStepPlayer::computeCurrentLookAtDir(float ratio, // We multiply this vector by the ratio so that we can have a vector that represent the current position we are looking at startToFinal = startToFinal * ratio; - // We compute the position we are looking at - NLMISC::CVector currLookAtPos = startDir + startToFinal; - - // We compute the direction - NLMISC::CVector currLookAtDir = currLookAtPos - currPos; + // We compute the direction we are looking at + NLMISC::CVector currLookAtDir = startDir + startToFinal; currLookAtDir.normalize(); return currLookAtDir; diff --git a/code/ryzom/client/src/camera_animation_manager/camera_animation_steps_players.cpp b/code/ryzom/client/src/camera_animation_manager/camera_animation_steps_players.cpp index fd287d208..755940f40 100644 --- a/code/ryzom/client/src/camera_animation_manager/camera_animation_steps_players.cpp +++ b/code/ryzom/client/src/camera_animation_manager/camera_animation_steps_players.cpp @@ -82,14 +82,11 @@ public: float ratio = currCamInfo.ElapsedTimeSinceStartStep / getDuration(); - // We compute the starting look at direction - NLMISC::CVector startDir = currCamInfo.CamLookAtDir - currCamInfo.CamPos; - // We compute the final look at direction NLMISC::CVector finalDir = resolvePositionOrEntityPosition(LookAtPos) - currCamInfo.CamPos; // We get the current look at direction - camInfo.CamLookAtDir = computeCurrentLookAtDir(ratio, camInfo.CamPos, startDir, finalDir); + camInfo.CamLookAtDir = computeCurrentLookAtDir(ratio, camInfo.CamPos, currCamInfo.CamLookAtDir, finalDir); return camInfo; }