What is the most elegant and optimal way to enforce one 3D mesh being drawn infront of all others?
Something similar to sorting layers for sprites, but compatible with (Skinned) Mesh Renderer.
I am aware of rendering queue, but as far as I know it’d mean writing my own shader (or “wrapping” existing one) which doesn’t seem like a scalable/flexible/elegant way to do this (replicating a code just to alternate the order of drawing). I have also considered using two cameras with two different culling masks - first camera renders everything aside from player, and then second one renders character on top of everything but this seems like a really suboptimal solution.
I want my 3D character in “2.5D” platforming game to always be rendered in front of the platforms without moving either player or the platform since it’d intervene with the game’s logic and collision detection. For example - right now when he “jumps through” a platform he “sinks into it” since the front face of the cube-shaped platform obstructs the view.