There are a variety of causes for pain with looking in certain directions. There are a variety of causes including irritation to the muscles that move the eye or the nerves that innervate the muscles. The entire differential diagnosis is beyond the scope of this discussion. From your description, it is not clear if you are having any associated symptoms such as double vision
, a decrease in your visual acuity or any recent upper respiratory tract infections, fevers, chills or sinus infections. Other things to consider are whether anyone in your family ever have problems like this or if you have any sick contacts that you interact with often? Have you had any recent trauma to your eyes or head?
As there are many potentially serious causes of the symptoms you are having, it is recommended that you be evaluated by an ophthalmologist
who can better evaluate your medical history and presenting symptoms and decide upon the appropriate medical work up. This may include lab tests or imaging studies to better understand the underlying cause for this eye pain. They may recommend that you be evaluated by a specialist depending on what they find clinically.