Bool GetViewLocation() const? Whis is it const?



bool GetViewLocation(FVector2D ScreenLocation, FVector & WorldDirection) const;

My question is… why is it const if we passing reference to World Direction variable which is outside GetViewLocation?
when we hit play… This var is changing when we rotate camera… I dont get it why const it typed there?



const on a class function means it doesn’t change any of the class’ members. In other words, the variables declared in the header file.