Mod of Ross C's code. set coeff quite low (below 1) although it depends on your scale.
positionentity camera,entityx(camera),entityy(camera)+sin(angle)*coeff#,entityz(camera)