x

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"

How do i change a SceneCapture2D's Texture Target at runtime?

I am trying to simulate a security monitor where the player can get a feed from some cameras, and select which camera to watch

This is what i tried: i get all of my SecurityCamera actors from the world: alt text

Then, when the player presses 1,2 or 3, it updates a variable and to change the Texture Target i do this stuff:

alt text

The problem is that this logic doesn't work, where's the mistake?

Thanks for the answers.

Product Version: Not Selected
Tags:
more ▼

asked Jan 05 '15 at 03:33 PM in Rendering

avatar image

Crax
11 2 3 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hey Crax -

If I am understanding you correctly you want to have three camera (A,B,C) and one Monitor that the player can change between A,B,C by pressing 1,2,3. If that is the case, then you would not want to adjust the Render Target of the Camera but adjust which texture is shown on the monitor.

For the setup I would assign 3 Different Render Target Textures to your three cameras. I would then create a material with a Texture Sample Parameter plugged into emissive and assign the default camera view into the parameter. Next, Take the Material and create three Material Instances of that Material and name them MI_CameraA, MI_CameraB, MI_CameraC. I would place my monitor in a blueprint and in the Construction Script, I would create a Dynamic Material Instance based on one of the MI_Camera material instances and assign it to my monitor. In the Event Graph I would on each of the number press events reassign the Dynamic Material Instance to the correct MI_Camera materials. So, on Key Press "1" Create a Dynamic Material Instance based on MI_CameraA and assign it to the monitor, on Key Pressed "2" Create a Dynamic Material Instance based on MI_CameraB and assign it to the monitor, and finally on Key Pressed "3" Create a Dynamic Material Instance based on MI_CameraC and assign it to the monitor.

Thank You

Eric Ketchum

more ▼

answered Jan 06 '15 at 08:18 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.8k 701 255 733

avatar image Crax Jan 06 '15 at 09:28 PM

Yeah, in the end i kinda copied the camera switch from the Blueprint Office example. I used the not-working method because it worked on Unity.

(comments are locked)
10|2000 characters needed characters left
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