I think this would work if you created a polyline object and then continuously added short segments to it as the user traced a line.
See here: https://developer.anscamobile.com/content/display-objects#Polylines
Basically, once the user starts drawing, sample their finger’s x,y position at short intervals (maybe 1/10th of a second?) using timer.performWithDelay(), and then on each timer cycle add a new connecting line segment to each new point. You’ll get different amounts of “smoothing” in the line depending on the length of your samples, so you may need to experiment here.
At the same time, add each new (x,y) point to an array. Then, you can make any object “follow” that line by having it follow those stored points. To get the “Flight Control” effect, you’ll also want to rotate the sprite so that it’s facing in the same direction as the current line segment. (Each line segment has two points, and you can use those points to calculate the proper angle that the sprite should be facing.)
The rest of this depends on your game logic: for example, in Flight Control, if a line is drawn “very near” a plane, the plane decides to “follow” that line, and aligns itself with the line from that point onwards. But if the line isn’t drawn closely enough to the plane, the plane ignores it and nothing happens.
[import]uid: 3007 topic_id: 1727 reply_id: 5129[/import]