Player pawn always on foreground / Depth tricks ?

Hi, i’m having a Gameplay / Technical issue and i could use some light :slight_smile:

So basically i’m working on a “multiplayer 3D sidecroller” type of game, and i need to find a way for Pawns to occupy the same “2D” space.
After some research it appears that most games of this type just have the players character displayed “on top” of others, on the “top layer” if you want (each player always sees his character on top of the others). That solution would work for me (i don’t want to enable collisions between players) but i can’t manage to implement it.

I’ve been digging in the CustomDepth area (see 2 first screenshots) but it’s not what i need or i don’t know how to make it work the way i need.
3rd screenshot (sorry for quality, it’s a random Youtube sidecroller screenshot full of motion blur) is a good example of what what i would like to achieve for each player.
I’ll take any advice, thanks you in advance !

eg_03.jpg
eg_03.jpg
eg_03.jpg

Gonna bump this once just in case, still struggling with it :confused:

In the case of a side scroller, you could potentially do this by using pixel depth offset in the material to push the Non-player characters away from the camera. Pixel depth offset can only push objects away from the camera for depth testing purposes, it can’t pull them towards the camera (which is why you have to use it on the NPCs and not the player).

or you could pull the vertices of the player pawn towards the camera on worldpositionoffset

Also true!! :slight_smile:

In the post processing live stream they talked a bit about post processing volumes doing stuff with pixel depth, particularly for keeping a UI in front of player in VR and not clipping into close objects. Maybe will point you in right direction?