How do I get the current camera location (including when in the Editor)?

I’m reposting this here in the hopes that someone who’s not on AnswerHub might see it.

I’m trying to update the visibility of an actor based on a trace between the current camera and the object. I need it to work in the editor too (the objects have depth testing turned on so they always render on top of everything and there could be a lot of them).

I think I’ve gotten most of the way there but I always come back to the provlem of not being able to get a reference to whatever the current camera is. I’ve tried using a Get Camera View but it doesn’t seem to want to refer to “self” for a target and I don’t know what I should be putting in target.

Oh, I’m trying to stick to blueprints for this one.

I guess you already found the solution, but as the alert says you need pin something at get camera view target. (not sure in your case, but a reference to the pawn or player should be fine)