Bool GetViewLocation() const? Whis is it const?

urc_s04_using_deprojectscreentoworld

#1

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?

Thanks


#2

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.