What's the point of ofEasyCam::setDistance

I was trying to use ofEasyCam::setPosition, to place my camera. But the camera moved to some weird location instead of the position I specified. Than I realized ofEasyCam::setDistance was being called and was overwriting my position. Is this necessary? I tried messing with ofEasyCam::setDistance, but I am getting some clipping. It seems to set the nearClip too far in front.

Can someone please explain what fEasyCam::setDistance, is supposed to do?

Hi, the idea is to set the distance from the camera target (the point that the camera rotates around and looks at).
Just by calling set position you are actually moving the camera to the specified position but it will not point towards the target. It will stay oriented in the way it was.
What is it exactly what you want to achieve?
cheers

Why cant I call setPosition. Then call lookAt? Why does easyCam have to modify the distance from the target?

you can.
setPosition and lookAt are not methods of ofEasyCam, this are from ofNode from which ofEasyCam inherits.
So setDistance has nothing to do with setPosition.
the only thing that might be calling the setDistance method is the setAutoDistance(bool …) switch. by default this is enabled. but you might want to disable it. The idea of it is to set the distance according to the camera fov and the viewport size, so no clipping occurs.
Can you share some code where the problem you have appears?

@roymacdonald Thanks I did not know about the setAutoDistance. The clipping bug was because I was trying to set the nearClip value to 0.0. When I did that openframworks overwrote the nearClip to 6.65. Setting the nearClip to .1 fixes my issue.