Game orientation

Hello, I m working in a game in witch a rolling ball is controlled by the mouse if the mouse goes up, the ball goes forward, but the camera isn’t parented to the ball, it has a camera actuator, so it changes the direction in witch it looks the ball. the ball is rotating (rolling) so the force cant be applied locally, and globally neither because the camera rotates. I want to multiply the force by the camera’s z rotation so I apply the force to the ball always in x but I dont understand orientation matrices. ANY IDEA?