Hi May I Ask How To Render My Character Behind When He Is Behind The Wall And Infront Of It If He Walk To The Front?
Someone may have a better idea, but the first thing I thought of is to use display.newGroup() to create “layers” in the scene:
group6 --background
group5 --ground
group4 – objects in back room
group3 --ground
group2 --wall
group1 --ground
As the character moves down/towards the screen, move it from group 3 to group 1. It’s not a very elegant solution though.
it works like magic haha
so i check my char y if it is over the wall then change it’s layer
thanks man
Good to hear. If you need more layers then just add more groups.
Sure, you’ve already noticed this, but I’d always move the character forward/back 2 groups at a time so that the layer in between is the one that has the level’s objects. That will let you have the character walk behind the table and chair for instance.
Someone may have a better idea, but the first thing I thought of is to use display.newGroup() to create “layers” in the scene:
group6 --background
group5 --ground
group4 – objects in back room
group3 --ground
group2 --wall
group1 --ground
As the character moves down/towards the screen, move it from group 3 to group 1. It’s not a very elegant solution though.
it works like magic haha
so i check my char y if it is over the wall then change it’s layer
thanks man
Good to hear. If you need more layers then just add more groups.
Sure, you’ve already noticed this, but I’d always move the character forward/back 2 groups at a time so that the layer in between is the one that has the level’s objects. That will let you have the character walk behind the table and chair for instance.