mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge pull request #1747 from Azaezel/alpha41/reverseLoop
properly handle looping shapes moving backwards
This commit is contained in:
commit
3661499b33
2 changed files with 6 additions and 2 deletions
|
|
@ -275,7 +275,9 @@ void PathCamera::advancePosition(S32 ms)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Script callbacks
|
// 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));
|
onNode(int(mPosition));
|
||||||
|
|
||||||
// Set frame interpolation
|
// Set frame interpolation
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,9 @@ void PathShape::advancePosition(S32 ms)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Script callbacks
|
// 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));
|
onNode(int(mPosition));
|
||||||
|
|
||||||
// Set frame interpolation
|
// Set frame interpolation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue