GetFirstPhysicsBodyInReach() const won’t work if
both of GetReachLineEnd() and GetReachLineStart() aren’t const. When they all are const it works fine. It also works if I remove const from all three.
I don’t understand why is that. I have jumble of thoughts.
My thinking is, first function calculation a vector, so I guess it’s changing some value? By why then compiler is allowing it to be const?
Second one doesn’t calculating anything, just getting and returning some location for vector, so it makes sense, why it can (and should) be const.
But I don’t know why GetFirstPhysicsBodyInReach() care about those to to be the same const/non const type as itself.