linear velocity or location?

Let say you are facing y-axis. Then your right hand will be on x-axis.

In logic editor, I set “you” to have a linear velocity (X direction) when I press “D”. This means that you move to X direction when I press “D”.

But my problem occurs when you have been rotated which means you are not facing y-axis anymore.
When I press “D”, you move to the X direction which I don’t want (I want you to move to the right).

How to solve?
To make things clearer, see attachment: Linear velocity.blend (409 KB)

What you are telling Blender to do is move in world co-ordinates. What you want is to move in local co-ordinates.

You are not moving ‘locally’- on the motion actuator there is a small L icon next to an A. Click it so its down and your problem goes away.