Problem with Inaccurate Animation in the BGE

Hi everyone! this is my first question and I don’t speak English very well, so sorry for that.

The problem is that i did an animation of a cube, that the only thing it does in 4 frames is rotate 90 degrees in the Z axis, an another similar but different rotation: 180 degrees in Y axis.

When I play the actions with python (object.playAction()) or an action actuator it plays the action but instead of rotate 90 or 180 degrees, it rotates, something similar to 85 degrees and 170 degrees, it’s really anoying and visually awfull.

so… What can it be?

here is the blend file:

to reproduce the error hit P to play, and hit Z or Y to see the rotation in that axis, launch the game in an orthogonal view to see what i am talking about. you will see that the lines are not perfectly parallel to the screen, you will see the pixels.

Thanks to anywho that read this post and can help me to solve this problem, it has me awake at night D:, thanks to all and sorry for my English.

Attachments

Problem.blend (596 KB)

Yep, animation seem stop sometimes 1/60 second wrong time(1 frame too early).
You have the animation speed is 24 fps and screen updates 60 hz. Animation steps 24/60=0.4 frames per update.
One missing updates in your animation seems 18 degrees.
I don’t know is this really bug or feature of float to integer conversion?
You can fix it by dublicating frame 4 keys to frame 5, and set animation end frame to 5.
Rotation is accurate now. I still think better is use direct rotations to this kind moving.

Thanks a lot!!! It worked, wow i never will find that, thanks!