Curved movement - point to point

Is there a (relatively easy) way of moving an object from one point to another along a curved line?
I have some enemies that move to random places around the player every few seconds but it looks stupid with them moving in a straight line.
 

I hope this makes sense. 

Try this:

local tmp = display.newCircle( 50, 50, 10 ) local moveTime = 2000 transition.to( tmp, { x = 400, time = moveTime } ) transition.to( tmp, { y = 100, delay = 0, time = moveTime/2, transition = easing.outCirc} ) transition.to( tmp, { y = 50, delay = moveTime/2, time = moveTime/2, transition = easing.inCirc} )

https://www.youtube.com/watch?v=-r5wdyT37wY&feature=youtu.be&hd=1

Hi @Appletreeman,

You may want to check out this tutorial. It also has sample code included which you can adapt.

http://coronalabs.com/blog/2014/09/09/tutorial-working-with-curved-paths/

Best regards,

Brent

Try this:

local tmp = display.newCircle( 50, 50, 10 ) local moveTime = 2000 transition.to( tmp, { x = 400, time = moveTime } ) transition.to( tmp, { y = 100, delay = 0, time = moveTime/2, transition = easing.outCirc} ) transition.to( tmp, { y = 50, delay = moveTime/2, time = moveTime/2, transition = easing.inCirc} )

https://www.youtube.com/watch?v=-r5wdyT37wY&feature=youtu.be&hd=1

Hi @Appletreeman,

You may want to check out this tutorial. It also has sample code included which you can adapt.

http://coronalabs.com/blog/2014/09/09/tutorial-working-with-curved-paths/

Best regards,

Brent