Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to get (camera)sceneCapture in actor blueprint?

Hello I have problem with SceneCapture2d and get this camera view. In level i have one scenecapture. The image is cast on the box (blueprint actor). I want to create an interaction now - the player walks to the box, pushes F and the player's camera changes at this moment, now we see the picture from the camera (scenecapture), after pressing again we return to the normal view. The problem is that I have no idea how to get a camera view in the blueprint function.

Product Version: UE 4.21
more ▼

asked Nov 17 '18 at 12:33 PM in Blueprint Scripting

avatar image

6 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

To change player view to any camera view, use SetViewTargetWithBlend function. It gets camera component inside actor and uses it as new view target.

more ▼

answered Nov 17 '18 at 04:48 PM

avatar image

4.3k 80 17 104

avatar image Himiodzio Nov 17 '18 at 04:51 PM

That's what I would do, but I don't know how to get the camera from level to my blueprint function.

avatar image redbox Nov 17 '18 at 05:15 PM

Link it as property. For example, in your "box blueprint" create editable Actor variable. Put box into level, select it, open it's details and set camera actor as this actor property. So now you have a reference of camera actor inside box blueprint.

To better understand how to communicate blueprints in unreal, explore BlueprintCommunication map in ContentExamples project.

avatar image mightyenigma Nov 17 '18 at 05:19 PM

That is even better than my idea!

avatar image mightyenigma Nov 17 '18 at 05:18 PM

If your code is in the level blueprint then all you have to do is select the camera in the viewport and then right click in the level blueprint graph to create a reference to the selected actor. For other blueprints the method above should work.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The only way I know how to use scenecapture2d so far is to create a RenderTarget texture with it, make a Material out of that, and apply the Material to a UMG widget or a static mesh.

This makes the view from the other camera appear on the surface of another object.

But it sounds like all you want to do is switch the player's ebtire viewport over to the other camera instead of the ome their pawn was born with. You dont need a scenecapture to do that, you just need to get the playercontroller -> get camera manager -> change view to camera with blend Or something like that. I dont remember the node names exactly.

more ▼

answered Nov 17 '18 at 03:58 PM

avatar image

3.8k 18 20 20

avatar image Himiodzio Nov 17 '18 at 04:12 PM

I create something like a TV set. The TV continuously displays the live image when I interact with it, I want the main camera to change when interacting with the one we see on TV.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

SetViewTargetWithBlend has an input "New View Target" for the actor object that has a camera. If your actor at the level is BluePrintActor, then the pointer to it is a "Self" (Get a reference to self) in your BluePrintActor.

(Self)---->[New View Target]

more ▼

answered Jun 14 '19 at 06:40 PM

avatar image


(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question