Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    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)

    Leave a comment:


  • 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.


    Attached Files
Working...
X