How do I activate and deactivate "Render CustomeDeph Pass" from Blueprint?

I’m making a Visual Novel in which an animation runs in the background while the dialogues of the conversation appear in front of it, together with the character speaking with an animation. I leave the example of “Persona5” which is aesthetically similar:

I have created a post process material that adds a line to the character that speaks in the foreground, the problem is that the 3D model is the same as the one I use in the background animation, how can I make the “Render CustomeDeph Pass” to activate only when I want or where I want? I can use any solution, but I think it would be logical that if the character appears right in that area, Render CustomeDeph Pass would be activated in some way. The simplest, however, would be that in the blueprint where the character’s animation is called the Render CustomeDeph Pass would be applied, but I don’t know how to do any of these things.

Best regards and thanks in advance.

Hello!

What I finally did was to place a collision sphere on my NPCs and, when they are positioned inside the collision cube, “On component begin Overlap” is activated and “Custom Depth” from blueprint is activated.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.