Browse Source

Fixed a timing issue in MotionTrack when used as a control

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8533 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 14 years ago
parent
commit
64bc0298b2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/src/core/com/jme3/cinematic/events/MotionTrack.java

+ 1 - 1
engine/src/core/com/jme3/cinematic/events/MotionTrack.java

@@ -160,7 +160,7 @@ public class MotionTrack extends AbstractCinematicEvent implements Control {
         if (isControl) {
         if (isControl) {
 
 
             if (playState == PlayState.Playing) {
             if (playState == PlayState.Playing) {
-                time = (elapsedTimePause + timer.getTimeInSeconds()) * speed;
+                time = (elapsedTimePause + timer.getTimeInSeconds() - start) * speed;
                 onUpdate(tpf);
                 onUpdate(tpf);
                 if (time >= initialDuration && loopMode == loopMode.DontLoop) {
                 if (time >= initialDuration && loopMode == loopMode.DontLoop) {
                     stop();
                     stop();