I am learning Blender Python. I have a cube which I have animated using logic blocks in Blender Game Engine. I can rotate the cube get the x, y an z rotations. However when I release the key I want the cube to rotate - > 45 degrees, forward or < 45 degrees backward - to the nearest 90 degrees.
Can any body point me to a useful tutorial or give me any directions?