flying objects in 3d world

I want a sphere to fly from the camera strait forward. I use the glTranslatef and glRotatef functions to set the camera position. The screen is updated using sinus and cosinus functions.
I kept trying but couldnt manage to make a function for the sphere.

Can someone help please!

IF you have camera organized your camera like eye, pitch,yaw and roll, it simple to get the vector in wich the camera is looking.
If you use the eye - target way just normalize the target coords after translating the camera in 0 and you get the vector in wich the caemra is looking.
Just use this vector for the sphere movements.


Yes thats a good solution, just one thing, what shall i use as target vector?