Prevent clipping of billboard 2D sprites into 3D objects for 2.5D game

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Vaatzes

Hello,
I’m trying to teach myself the Godot engine, and have been following several tutorials. One thing I like to do to help myself understand the tutorial material better is to interact with and extend the sample projects with things that I think I’d run into were I to use it.

Recently I’ve been trying this youtube video which shows how you can use 2D sprites in a 3D world, and have them always face the camera (billboard) to create a 2.5D world. Sadly, as is showcased in the video at 2:25, sprites can clip into 3D boxes.

Is there a way to draw the sprite over the 3D boxes when it’s in front of it or next to it, and to only draw it behind the 3D box when it’s really behind the complete box?

Any additional tutorials and pointers for 2.5D games would also be greatly appreciated! Thanks in advance!