Making an actor visible only from a scenecapture2d
I need to make an actor visible only to a scenecapture2d and invisible to the main player camera.
This is so that the player will only be able to see the actor when viewed through a security camera.
This is a very important feature of my game, is there any way to do this in the current version of UE4?
asked Nov 03 '14 at 05:32 PM in Rendering
After a bit of troubleshooting with blueprints I was able to set up an actor that was hidden to the player but visible if viewed from another camera. First I created a HiddenObject blueprint with the static mesh to be hidden. In the static mesh's details settings I set the Rendering option "Owner No See" to true and used the Set Owner node to make my player the owner of the actor. The collision was set to "No Collision" so the player wouldn't run into the invisible mesh.
Since the player is now the owner of the actor it will not appear for the player camera. When the camera view is switched to another camera (such as a security camera), this new camera is NOT the owner so it can still see the mesh. Hopefully this helps setting up objects to be hidden from the player but still visible from another camera.
answered Nov 03 '15 at 10:39 PM
I fixed my problem by diving into the source code, I inserted a new array of extra hidden actors on the player controller and then added a line to append it to the hidden actors array that is built by the game (I assume for occlusion culling purposes).
Now I can insert actors that I don't want the player to see into the extra actors array using blueprint, works like a charm!
answered Nov 06 '14 at 08:04 PM
So after a bit of trial troubleshooting on my own using blueprint scripting, I discovered a really simple way to achieve what you are trying to do.
What I did was set up a trigger box in my level what when overlapping, would toggle to a camera in my level. After setting the camera as my active view, I just added an "Actor Hidden In Game." node and the actor I was toggling disappeared. Keep in mind if you want to make this believable you need to toggle off static shadows for the object you are hiding so the shadow does not remain when the object disappears.
Here is how I set it up in my level blueprint and in my scene as well.
Level Blueprint Set-Up
Hope this helps you achieve your goal!
answered Nov 20 '14 at 05:31 PM
I have made a patch and pull request for this feature.
This adds Blueprint functions to the PlayerController to selectively hide components from the player, but not from SceneCapture components.
answered Jun 22 '15 at 07:14 PM
You can do it if you grab the scenecapture2d, then look for hide actor components. Attach the reference for any actor you want to hide. And that's it.
answered Aug 10 '19 at 05:16 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here