Moving the object along the arc

How do I set the arc movement of an object using a “go.animate” ?
Looks like you just need to set two axes of motion at the same time as the desired “EASING”.
How do I do that?

I just tried this bit:

r = 30 --radius of the arc
y = go.get_position().y -2 * r
x = go.get_position().x
t = 5 --time for animation

go.animate(".", "position.y", go.PLAYBACK_ONCE_FORWARD, y, go.EASING_INOUTSINE, t)
go.animate(".", "position.x", go.PLAYBACK_ONCE_FORWARD, x-r, go.EASING_OUTSINE, t*0.5,0, function()
	go.animate(".", "position.x", go.PLAYBACK_ONCE_FORWARD, x, go.EASING_OUTSINE, t*0.5)
end)

This is based off of this little sample here:

You’ll need to play around with this to see how it can fit your need.

Good luck!

8 Likes

Thank you! :hugs:

1 Like