I'd like to use the linear path so i dont have to set up the series of tweens and timers to do the same functionality, but i'm having some issues:
//p1 and p2 are fixed points that i have verified to be the correct values by using trace()
var currentLoc:FlxPoint = new FlxPoint(front.x, front.y);
var fp1:FlxPoint = new FlxPoint(p1.x, p1.y);
var fp2:FlxPoint = new FlxPoint(p2.x, p2.y);
var speed:Float = 15.0;
FlxTween.linearPath(front, [currentLoc, fp1, fp2], speed, true, { complete: doneMovingPath } );
I think I'm using this correctly. i want the sprite called "front" to move from its current location, to p1, and then to p2. basically, it's an "L" shape.
This doesnt work as expected though. what happens is that front jumps immediately to p1, and then spends speed seconds to reach p2.
Why could this be happening? what am i misunderstanding? or is there a bug?
Also not related to the above issue:
-If i want to use speed as opposed to duration (currently using duration), what does the speed variable have for it's units? it's a float.
is it in pixels per second? seconds per pixel? pixels per gameloop? something else?
Thanks for any help.
-drew :-)