How do I find the direction an object is moving

I need to add drifting to my game and to do that I need to find the direction. If you have another way to add drifting that would also be helpful.

How are you currently moving the object?

Walk3D (or top-down walk, its the same thing)