Blender somehow makes it so when you look from side of the body:

If you would try to grab the 'arrow' on x axis and move mouse only on Y axis the body wouldn't move.
But if you would rotate cam a bit like this:

And try to grab the 'arrow' on x axis and move mouse on Y axis the body would move.
I would like to achieve this in my editor as this is more comfortable way to move body than lets say moving body according only to mouse delta X position.
Anyone could give me a hand on maths behind this?
