Tags aren't working for Cameras

It looks like there’s no way to get a camera by tag.

I created a sample to illustrate the issue. Here is the camera – you can see it has a tag of “Test”:
31763-
Here’s the Level Blueprint in my sample, including watches on the values for tags, the result of “Actor has tag”, and the cast being done in the loop:

Notice the following contradictions:

  • The current array element is definitely TestCamera.
  • Tags is empty, despite being set in the level.
  • “Actor Has Tag” is False for “Test” tag, despite TestCamera having that tag.

Hey Guy Paddock,

After investigating the tagging issue further, it seems that the reason you ran into the ‘false’ result from tags was because they were set up to look for actors, instead of components.

The attached screenshot was created out of the Third Person example template within UE4.

I changed the following to obtain a ‘true’ result from the print string for the tags:

  1. Changed ‘get all actors of class - actor class: camera actor’ to ‘get all actors of class - actor class: third person character’.
  2. I had to create a new ‘ForEachloopWithBreak’ because we changed the actor class to the third person character
  3. I deleted ‘Cast to CameraActor’ because we can use an array element for the ‘follow camera’ on the character
  4. ‘Actor Has Tag’ was replaced with ‘Component Has Tag’
  5. ‘Set Result’ was taken out completely, as it was no longer needed for the function you were trying to achieve

If you have any further questions, please feel free to reply.

Thanks!

Hello Guy Paddock,

I hope my answer to you previously resolved the issue you were encountering. However, since I haven’t heard from you in a few days, I’m marking my previous response as the answer to your question. If for some reason this solution didnt’ resolve the issue you were encountering, please reply to this thread and we’ll assist you further.

Thank you!

Another possible solution is set an actual Actor Tag and no a Component Tag like the image show. And Actor Tag can be found under the Actor section in the Details panel.