Hello community!
How should I do to make the character keeps rendered always over the ground in a top-down game and not gets covered by the gound object as soon the character’s Z position is lower than the ground’s Z?
This is the context:
I put a background image in Z: 0, Y: 350
The ground is another plane rotated 90º in Z:350, Y: 0
The character can move freely in the Z and X axis and the camera (normal, not ortho) follows it in an angular position of 30º over his head and a distance of Z - 800 to keep a good view,
Everything looks fine, when the character’s Z is less than other 2D objects over the map it looks above and below when the objects are closer the camer. The big problem is the ground…
when the character is closer than the middle position it is rendered over the ground but when I move it further away passing the half then it gets covered by the ground.
So how should I handle it?