|Topic was automatically imported from the old Question2Answer platform.
I recall figuring out how to do this in Unity with almost zero effort, but I’m struggling with this in Godot.
I’m making a game with 2d pre-rendered backgrounds and 3d characters and objects, ala Resident Evil or Final Fantasy VII. I’ve already figured out the part that involves overlaying the 3d characters over the 2d backdrops, but I’d like to hide objects that are supposed to be behind walls and such.
For that, I’ve thought of a solution to use some kind of shader for the collision geometry that renders it invisible so the backdrop can be seen – but still has it conceal any characters as if they were opaque 3d objects.
I’m sure there’s some simple depth buffer trickery I can pull to do this, but it’s beyond me. I know next to nothing about writing shaders. I’ve tried messing with the Spatial Material settings and can’t seem to get what I want.