Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17089

How to combine 2 tweens

$
0
0

I am using Cocos Creator 3.

I have a wheel spin animation.
1st tween start the wheel, 2nd tween keep it spinning.

this._wheelSpinStartTween = tween(this.node)

            .by(5, { eulerAngles: new Vec3(0, 360, 0) }, {

                easing: "sineIn",

                onComplete: () => {

                    this._wheelSpinTween.start();

                }

            })  ;

        this._wheelSpinTween = tween(this.node)

            .by(4, { eulerAngles: new Vec3(0, 360, 0) }, {
            })
            .repeatForever();

As the code suggest I am starting spin animation after start animation.
The problem is there is clear change of speeds when transition from 1st animation to 2nd.

Is there a way to solve this?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 17089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>