|Topic was automatically imported from the old Question2Answer platform.
i am now sure how can i make my background(forest) appear behind the character or make my character appear to move on it, since i cant view the character.
Here is the hierarchy and what i see in the game!
What i see:
Edit: should i place the player inside the background scence instead? like this: https://imgur.com/wzI9Iv1
Hi! To make the player just be always in front of the background, you only need to put the player below the background in the tree hierarchy. You don’t need the player to be inside the background, just below it.
The things in the tree are being rendering in that order, so if you have the player and then the background, when rendering the background, player would be behind. If you have background and then player, as you render the player last, you will see it in front. Just that.
You could also set z index of player to 1, or higher value if needed.
However, your image seems to be some kind of top-down game? in that case, you should put all your objects (character, maybe the house?) under an YSort node, so you can render the player infront of the house when moving in a lower y, and behind the house if you move it in a higher y.
Thanks it works now! You are right is a top-down game, is this what you ment with Ysort:
Rashid | 2020-07-17 13:27
Hi! Glad to help. The link you provided seems not to work.