Hmmm, I havenât really messed around with tags yet in Unreal. But that certainly seems like something they would help you handle. For example you could tag your object with âCameraOnlyâ and exclude anything with that tag from being rendered by your Player Camera.
I canât find any function for actually hiding them from a specific camera though. You can set them to be universally visible or not, you can also choose to hide them specifically from a scenecapture2d, but there is no way I can find to hide them from just one camera.
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!
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.
This does not help a bit, it is easy to hide objects from all cameras, but no way to make things visible only to a specified camera, that would be what I am actually looking for the most. If we would have any way to make a camera only see what we want it to see, independently from which objects are visible set or not, then we could for example add a vision of the map where only the edges are visible to the specified camera (while the other cameras render all objects, that are set visible) or make only objects exclusively visible to the specific camera that contain a boolean variable, that enables vision to the specified camera only. Or to describe it with other words : it would be some kind of individual render mode for a specified camera. Any help ?
Is there a way I can access the standard camera blueprint source code and copy it to create a special camera with that possibilities ?
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.
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.