how to get the direction of motion of rolling ball

I want to make a little game, a ball is dropped onto the ground and rolling. I want to use UpArrow key to give the ball a force in the direction of motion, so when the key pressed the ball will move faster. When the ball moves, the three axes changes, I don’t know how to get the direction of motion.
Can anyone help?

With python you could use getLinearVelocity() and setLinearVelocity() to retrieve and set, respectively, the velocity vector of your ball in world coordinates.

I agree, if you just want to be able to make the ball go faster and slower, you use getLinearVelocity() to get the velocity and then you multiply that by a number and then use setLinearVelocity() to assign that back. If you multiply by a number bigger than 1.0, you will go faster, if you multiply by a number between (0, 1.0) you will go slower.