I want to have a set of about 10 different rocks in my world environment. I have added 10 sprites with texture of different rocks and attach a Static Body + CollisonShape2D to each one of the sprites.
If I put the 10 sprites as nodes directly with the player node inside a Ysort under the world scene, the Y sorting works, and my player could go behind the rocks. However, if I put the 10 rocks in a separated scene (a rock scene), and instance the rock scene with the player node to the world, The Ysort does not work anymore, the player could only go behind one rock not all rocks.
I think that is because the world scene only use 1 Y coordinate from the Rock scene. My question is that, is there any setting I have to turn on to allow Godot uses all the Ysort coordinates for different CollisonShapes from an instance scenes? Thank you.