I’d like to animate a tank to make it vibrate. The intent is to have it animate vertically by one pixel, but occasionally animate horizontally by one pixel.
This is the code I’ve tried…
tankPos.x = tankPos.x-1;|
go.animate("/tank", “position”, go.PLAYBACK_LOOP_PINGPONG, tankPos, go.EASING_INOUTSINE, .1)|
tankPos.y = tankPos.y-1;|
go.animate("/tank", “position”, go.PLAYBACK_LOOP_PINGPONG, tankPos, go.EASING_INOUTSINE, .15)|
What I’m seeing is only the vertical animation. My guess is that the second call to go.animate obliterates the first call because they both affect ‘position’. There’s not a way to animate along two different axes at different rates, is there?