Custom render depth on a per player basis
Disclaimer: Not sure if this actually belongs in 'Rendering', but I figured it was the best bet.
I've got an interaction outline that is drawn over certain actors whenever they enter a collision sphere surrounding my player. The material is placed in the Global Post-processing Volume, under Postprocess Materials. So when the player walks close enough, a blue outline will be drawn over objects that can be interacted with. That said, I'm noticing that when I simulate two players in the game, the 'outline' material will on all clients even if only one of them is close enough to activate.
How can I show the custom render depth only for specific players that are close enough to be considered interactible?
The easiest way to achieve this is, when the character is entering the volume, to cast the actor reference you get from OnBeginOverlap and cast it to the character you want. Then, using the node SetRenderCustomDepth or whatever it was called, to set that actor to render custom depth. Upon exiting the volume you revert the changes.
Then, in the postprocess volume you add the outline material that renders across the entire screen, but only where the custom render buffer set.
answered Jun 12 '17 at 05:07 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here