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!