I looked at your project. The issue is that y
position of the kinematic body node named "xianto" is actually 0
.
You've moved the sprite and the collision shape but the actual kinematic body node is still at position (0,0)
.
The YSort
node only sorts its own children and because the sprite and the collision shape are not direct children of the ysort, it'll ignore them.
To fix this, first reset the position of both the sprite and the collision shape of xianto.
The position property is under the Node2D
section and part of the Transform
group (in the Inspector panel). Just click on the circular arrow thing to reset it back to (0,0)
.
Once you're done with that, you can move the kinematic body node without selecting the children by doing one of these two:
Select the kinematic body node and click on the "Move Mode" button from the scene toolbar (default keyboard shortcut is "W"). Then you can move it to wherever you want.
Select the kinematic body node. In the scene toolbar, click on the "Make sure the object's children are not selectable". I'm not sure how to describe the icon but it's the icon to the right side of the lock node button.
Now you can move the kinematic body node without having to worry about accidentally selecting its children.