How to limit camera rotation

What if i need my character entity to point another entity which is positioned to pickedx, pickedy and pickedz (camerapick). With 'pointentity' problem is that it points entity to another in all angles.