Fixed an initialization issue in MotionTrack
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8972 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
950276679e
commit
16759a9770
@ -202,7 +202,9 @@ public class MotionTrack extends AbstractCinematicEvent implements Control {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onUpdate(float tpf) {
|
public void onUpdate(float tpf) {
|
||||||
|
System.out.println("time "+time);
|
||||||
traveledDistance = path.interpolatePath(time, this);
|
traveledDistance = path.interpolatePath(time, this);
|
||||||
|
System.out.println("dist "+traveledDistance);
|
||||||
computeTargetDirection();
|
computeTargetDirection();
|
||||||
|
|
||||||
if (currentValue >= 1.0f) {
|
if (currentValue >= 1.0f) {
|
||||||
@ -305,6 +307,7 @@ public class MotionTrack extends AbstractCinematicEvent implements Control {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPlay() {
|
public void onPlay() {
|
||||||
|
traveledDistance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user