Update current time before we start stepping along the curve. Did not reach end before

This commit is contained in:
Emma Broman
2020-01-23 14:46:30 -05:00
parent 39a995fbe4
commit 98d8c0159c

View File

@@ -102,6 +102,8 @@ void AutoNavigationHandler::updateCamera(double deltaTime) {
}
}
_currentTime += deltaTime;
const PathSegment& cps = _pathSegments[currentIndex];
// Interpolation variable
@@ -120,8 +122,6 @@ void AutoNavigationHandler::updateCamera(double deltaTime) {
camera()->setPositionVec3(cameraPosition);
camera()->setRotation(cameraRotation);
_currentTime += deltaTime;
if (hasFinished()) {
LINFO("Reached end of path.");
_isPlaying = false;