Transparency Sort Mode not layering correctly

Hi, after changing the pivot of the tree to the base of the trunk and rezising the collision, my lil character does disappear when he goes ‘behind’ the foliage, but if he gets close to the trunk he shows on top of the sprite.

Transparency is set to custom axis and ive tried adjusting the collision and pivot further but the hero still shows if he gets too close to the tree trunk.

I do note that the pivot shows on the tree in the scene view as being in the middle, so i tried re-adding the tree (and the collision) after i edited the tree sprite’s pivot and applied but in the scene view the pivot looks like it isnt honoring the edit i made in the sprite … unless this is just how it displays?

image

The sort mode works by comparing the Y of each sprite’s position, factoring in the pivot. I’ve found for best results, the pivot for the tree needs to be within the collider region of the tree. This makes it harder for the player’s pivot to intersect with the Tree’s pivot.

The pivot is at the base of the tree trunk, which is within the collision zone, but hes still popping up in the tree canopy … should the tree on the scene display be showing the pivot in the middle of the tree, even though ive moved it lower in the sprite editor? The symbol looks the same but im wondering if on the scene this is just a handle to move the tree around?

Look in the upper left hand corner of the scene view. Make sure that your handles are set to Pivot, and not Center
image

ah yes, that makes it look much better aligned on the scene view, thanks. My little hero is still being somewhat of an exhibitionist though, even though he’s relatively quite far from the tree’s pivot and collision zone. Is this normal and to be expected?

Screenshot of the game running and the rendered view in the scene editor:
image

Where’s the pivot on the Player?
Here’s the pivot on the course player (The small circle by the Yellow and Black section)
image

Here’s the course project with the player behind the tree (the tree is semi-transparent while the player is behind it, that comes a few lectures later
image

my lil dude’s pivot point:

image

i can live with it though, it doesnt affect gameplay :slight_smile:

That’s where the pivot is on the course one as well. Strange. Might be a bug in that version.

Thanks Brian, i seem to be finding all the bugs! Good learning XP though

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms