I have a problem on Nikon D3200 with autofocus, using viewfinder it works in cca 70% cases, sometimes it has a problem to focus on objects (which distance is relevant). Using liveview it works correctly always, so when I cannot focus to something, I switch to liveview, and it magically works. I had this problem with all my lenses, it means it is something in the body. Any idea how to solve this problem? Thank you!
The camera uses two different technologies for focus. When you focus through the viewfinder, the camera uses phase detection for focus. When you activate live view, the camera uses contrast detection. Contrast detection is available only in the live view mode because it needs the camera's sensor. For more details about how these technologies work more, see this Fstoppers article: The Difference Between a DSLR's Viewfinder Autofocus and Live View Autofocus