Dynamic object, and applyRotation

Hi there, folks!
I’m learning BGE, and I’m puzzled by what seems like a simple problem.
I was following the tutorials from Blender Cookie on setting up a basic game, but I can’t seem to make my little character turn to the left, nor to the right without exploding.

I’ve included my blend file with the script in it, just in case you don’t have time to open the blend, the script goes something like this:

import bge
from math import pi

def main():

    cont = bge.logic.getCurrentController()
    player = cont.owner
    keyboard = bge.logic.keyboard

    if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.UPARROWKEY]:
        player.applyMovement((0, factor, 0), True)

    if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.DOWNARROWKEY]:
        player.applyMovement((0, -factor, 0), True)

    if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.LEFTARROWKEY]:
        player.applyRotation((0, 0, pi/128), True)

    if bge.logic.KX_INPUT_ACTIVE == keyboard.events[bge.events.RIGHTARROWKEY]:
        player.applyRotation((0, 0, -pi/128), True)
        
main()

When the object I am running this script on not dynamic, or rigid body, it turns beautifully. When I set it to either of those two, it flips wildly in more than one axis. Can anyone give me a hint?
Thanks!
-Murphy

BLEND: http://dl.dropbox.com/u/9297096/learning.blend

I tried your blend on the latest 2.63 build and its fine.

Do not use simple dloc or drot (equivalent to applyRotation and applyMovement) as they teleport the object around rather than actually applying a force to move them- higher values make the object almost bypass the collision on polygons.

If you want to use rotation on any fast moving object like a car or a player use setAngularVelocity, setLinearVelocity, applyForce or applyTorque.

Thank you RubberNuke! Good advice.
It turns out my issue was a bug that’s fixed in the latest build.
I’m sorry for the similar posts in this forum! I didn’t notice that they were held for moderation before posting.