How to make objects move in circular motion from (startX,startY) to (destinationX, destinationY) with some aberration using TweenLite [actionscript 3 library]?
How to make objects move in circular motion from (startX,startY) to (destinationX, destinationY) with
Share
You should be able to set a circular motion using the CirclePath2D plugin and maybe offset the location a bit with an
onUpdatefunction.The bit that sounds confusing is
because if you move in a circular motion, at some point you end where you started from.
if you start from one position and end in another, you might move on a curve, in which case you want to have a look at the BezierThroughPlugin.
Still, it’s fairly straight forward to animate on a circle path with an onEnterFrame loop and you can easily change the circle into an oval for example or randomly offset the path a bit. Normally you’d need to convert from polar to cartesian coordinates:
but Point’s polar() method already does that for you: