How to determine x/y path for moving an object?

Hello,

I have an object on the screen and I need to move it from that point to another which is probably at an angle. So what is the best way to determine the x/y path to move it along? For example, if I have a ball on the screen at 30/200 and I want to move it to 150/5 how can I determine the x/y coordinates for moving it? I can’t believe I can’t figure this one out!

Thanks,

Warren

Can’t you just use transition.to()?

https://docs.coronalabs.com/api/library/transition/to.html

Yes, thank you!! For some reason I thought that was just for fading objects in and out and not moving.

Just throwing this out there but transition.to() is very useful for many many things…

I also just read about setting the easing which is perfect for what I am doing. When the user taps the screen I am moving coins to the top of the screen so I can set the easing to make the coin curve out from where they tap and move up which will give it a nice effect.

Can’t you just use transition.to()?

https://docs.coronalabs.com/api/library/transition/to.html

Yes, thank you!! For some reason I thought that was just for fading objects in and out and not moving.

Just throwing this out there but transition.to() is very useful for many many things…

I also just read about setting the easing which is perfect for what I am doing. When the user taps the screen I am moving coins to the top of the screen so I can set the easing to make the coin curve out from where they tap and move up which will give it a nice effect.