Page 1 of 1

Animation events on Phaser3

Posted: Sun Dec 01, 2019 2:03 pm
by vainiillaguy
Hi, i want to know how can i get the callbacks of the animation events pinned in Creature.
Im using phaser 3 but don't managed to find anything, the same with others JS runtimes.

Use case: i have a running animation so i want to play (in phaser for ex.) a step sound every time the character makes contact with the ground.

This is like the only one thing that is stopping me from buy creature vs the other main competitor :)

Thanks and hope to have an answer today to enjoy creature this sunday!

Re: Animation events on Phaser3

Posted: Mon Dec 02, 2019 12:02 pm
by chong
Hello,

So right now the callbacks are not in the CreaturePack runtimes since it is a more lightweight ( but higher performance ) version of the Creature runtimes.

I do suggest however that you can do an easy "lite" version of it which is to simply get the sample the current frame of your animation ( after each animation step, you can retrieve the current frame ). Then you can simply fire off whatever custom event you want based on that animation frame.

Thanks

Re: Animation events on Phaser3

Posted: Mon Dec 02, 2019 5:16 pm
by vainiillaguy
Sounds cool as an alternative.
Thank you ^_^