Bee
Member
I am having one hell of a time depth sorting with an isometric game I'm making. Here's what I want:
- I have characters around 44x54 pixels
- I have objects ranging in size from 29x55 pixels to 100x100 pixels
- I want the characters to be able to walk slightly in front of objects so they layer over top the bottom of the object, and to walk slightly behind the objects so they layer behind
Here's how I have it set up:
- All characters and objects have depth = -y
- All characters and objects have an origin point somewhere in the middle lower half of the sprite (eg. the belt on a warrior, the middle of a trunk of a tree)
- All characters and objects' collision masks are rectangles that go from a bit below the visible part of the top to the bottom of the visible part of the sprite.
- Most sprites have transparent space around them to allow room for animations
And here's how it's working:
- Very rarely do they act like I want, but mostly the characters are able to walk on top of the objects when they should be going behind, and sometimes they go behind when they should be going on top. And it varies with the same type of object or same y positions.
- The obstacle code is working fine so that they can't walk through the objects
Is there some new way to depth sort that I don't know about or is depth = -y not suitable for what I want? Please help! This is making my game very unprofessional looking.
- I have characters around 44x54 pixels
- I have objects ranging in size from 29x55 pixels to 100x100 pixels
- I want the characters to be able to walk slightly in front of objects so they layer over top the bottom of the object, and to walk slightly behind the objects so they layer behind
Here's how I have it set up:
- All characters and objects have depth = -y
- All characters and objects have an origin point somewhere in the middle lower half of the sprite (eg. the belt on a warrior, the middle of a trunk of a tree)
- All characters and objects' collision masks are rectangles that go from a bit below the visible part of the top to the bottom of the visible part of the sprite.
- Most sprites have transparent space around them to allow room for animations
And here's how it's working:
- Very rarely do they act like I want, but mostly the characters are able to walk on top of the objects when they should be going behind, and sometimes they go behind when they should be going on top. And it varies with the same type of object or same y positions.
- The obstacle code is working fine so that they can't walk through the objects
Is there some new way to depth sort that I don't know about or is depth = -y not suitable for what I want? Please help! This is making my game very unprofessional looking.