Screenshot from the wrong camera?

I have a pawn blueprint with a spring-arm as a child, and a CineCamera actor as a grandchild.

When the Blueprint runs, I can successfully set that camera to active:


When it comes to taking a screenshot of that view, I cannot directly reference the camera. What I have done is Find All Actors of Class (Cine Camera Actor) and got the [single] item in the array in a For Each loop. Whilst debugging, the name of the item is show as Child Actor … CineCamera, etc., so it is definitely referencing the correct camera.

When the screenshot is taken, the viewport in the editor is boxed in red and a screenshot taken of that.

I’ve tried “Force Game View” of the Take Screenshot node set False and set True. I’ve even tried casting as a cine camera:

I think I’ve given it a good go trying to work it out for myself but I’d really appreciate thoughts on this! It should be really simple!
Thanks,
Hugh

The cine camera component is in the Pawn and you’re looking up cine camera actors:

image

That’s why it does not work.


Try it like so:

  • create a New Cine Camera Actor in the Content Browser:

  • open it and adjust the cine camera component’s properties to your liking:

  • in the Pawn:
    • add a Child Actor Component (you can attach it to a springarm, ofc)
    • set its Child Class Actor to the New Cine Camera Actor you created:

  • if you must (why, though?) look it up with Get All Actors, you can now do so

In short:

  • the cine camera is a separate actor
  • the pawn’s CAC spawns it

To make it neater, consider scripting the screenshot taking part directly inside to the New Cine Camera Actor created in the Content Browser.

Do tell if that works for you!

I will, thank you, Everynone!

It is very similar to a question you answered of mine a while back. Once I fiddle with something, everything seems to come undone.

1 Like

It works for “Take Hi Res Screenshot” (hurrah!) but not for other camera-related nodes such as “Set Current Focal Length”.

[If there was a ‘scratching head’ emoji, it would go here]

1 Like

Could you demonstrate what you’re trying to do? :thinking:

The cine camera is a component that lives inside this new actor. And that’s why I also suggested moving any kind of camera settings / ops to the new cine actor itself.

I have a Data Table from a CSV file that I am using to locate and point the camera, then set FoV, focal length, etc., according to the data in the table. I was trying to avoid having to use BP Interfaces to shuttle data to the camera BP and keep things in sync.

This sort of thing:

The penny has (finally) dropped! I now have a Cine Camera actor variable and a Cine Camera component that I can use where I need to.

The weird thing with saving screenshots is my next challenge.

Again, thank you very much for your help.

1 Like