properly handle looping shapes moving backwards

cameras too
This commit is contained in:
AzaezelX 2026-05-18 18:28:29 -05:00
parent 275bf3cd94
commit 5994aae4f2
2 changed files with 6 additions and 2 deletions

View file

@ -275,7 +275,9 @@ void PathCamera::advancePosition(S32 ms)
}
// Script callbacks
if (int(mPosition) != int(delta.timeVec))
if ((mState == Backward) && (int(mPosition) == 0) && (mSpline.advanceTime(delta.timeVec - mNodeBase, -ms) < TickSec))
onNode(0);
else if (int(mPosition) > 0 && int(mPosition) != int(delta.timeVec))
onNode(int(mPosition));
// Set frame interpolation