Feature request: animation frame callbacks

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Ha! Thanks for the answer Hybrid! 1 Frame late is not too bad, nothing to worry about.

EDIT: HEY! Found out the frame number retrieved was a float! I was comparing it with a signed integer! Converted the retrieved frame to signed integer and now the accuracy is really good! (not a single missed frame)

Code: Select all

if (((s32)nodeAnim->getFrameNr() == currentAnim.attackevent))
Now it matches up perfectly with the attack event I wanted to have in my animation (for combat damage). I refresh the object each 1/60th of a second, so now it's really precise to detect when it has reached the frame. All my animation are done in 30fps. Thanks Hybrid!
Post Reply