Tween a node from one position to another

how can I tween a node from one position to another?
just a small simple move animation?

Here one example, based in a code that I made for one game:

let ballTween = new Tween(sprite.node)
            .set({position: x, 0, 0)})
            .call(() => this.changeColor())
            .to(time, {position: new Vec3(destX, 0, 0)});

My Cocos Creator is 3.x, but I believe it works in 2.4, and maybe 2.3

you can refer to document: Tween System ยท Cocos Creator

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.