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

How to detect specific time in animation

$
0
0

I am using Cocos Creator 3.

I have a ball spin animation and I wanted to detect specific time in that animation. Say after 20 sec. I want to do something else.

 this._ballAnimation?.play('spin);
 this._spinAnimationState = this._ballAnimation?.getState('spin');

I could track the
this._spinAnimationState.current
in update function and detect specific time.

But is there another way of doing this?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 17103

Trending Articles



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