tween movement speed control <p>I'm using tween engine for smoothing paths of moving entities. To make interpolation you feed function like this: </p> <p><code>Tween.to(myObject, POSITION, 1.0f) .target(50, 70) .ease(Quad.INOUT) .start(myManager);</code> </p> <p>Last argument of <code>to()</code> function is duration. What i learned, if path is longer, the entities move quicker to the target. Shorter the path is, entities move slower. I have float variable called movementSpeed, in every entity, that should move entities 7 pixels per seconds. What is the way using my variable for tween's movement speed instead of having it specified once at factory constructor?</p> <p>My implementation:</p> <pre><code>Stack&lt;Vector2i&gt; stack = new Stack&lt;Vector2i&gt;(); /* ...pushing path points from last to first to the stack. */ Tween t = Tween.to(this, EntityAccessor.POS, 4.0f); for (int i = stack.size()-1; i &gt;= 0; i--) { Vector2i cur = stack.get(i); if (i == 0) { // if point is last then t.target(cur.getX(), cur.getY()); } else { t.waypoint(cur.getX(), cur.getY()); } } t.ease(Quad.INOUT); t.path(TweenPaths.catmullRom); t.delay(0.5f); t.start(game.tweenManager); </code></pre>