Here's one of my knex ball machine elements I designed a while ago, which I used again in http://youtu.be/wKzJOZih_K8. It swings the ball about 200 degrees then sends it rolling like a 10 pin bowling motion.
Personally, I prefer the 'metallic' colours for this element, but for the sake of instructions I'll use classic pieces.
Step 1: The Inner Cube
The element has a centre pivot point that goes through this.
Step 2: Top Supports
The ball goes in this.
Step 3: Pivot Supports
This is where the rod goes through for the rotation.
Step 4: Counterweights and You're Done!
Once you add the counterweights you're complete. The ball should always fall one way (see step 1 picture 3) and roll the opposite direction.
That_Jamie_S_Guy made it!