I’m not sure how your code exactly look like so it’s kind of hard to give you precise answer. However ‘OtherActor->SpotlightPicker’ should be replaced with your variable containing an actor your want to measure distance to.
The error itself doesn’t seem to have anything to do with constness. It simply cannot find variable called OtherActor in your code.