Forum rules - please read before posting.

Player characters with the same order layer flicker

edited November 2022 in Technical Q&A

Hi!

I've got multiple characters which follow the same default sorting map with no additional nodes and they have the same order layer. When they intersect at the scene they start to flicker.

I tried to change sorting map's setting "Affect sprite's" from "Order In Layer" to "Sorting Layer", but it hasn't affected the behaviour. Also I've tried to add a 'GameCamera 2D' following this topic https://www.adventurecreator.org/forum/discussion/5602/multiple-characters-and-followsortingmap (usually I use only the Main Camera), set it as default camera and at the scene prefab, it didn't help either.

I watch Order Layer and Z-coordinate of the sprites while they're flickering, none of them are changing, it's 0.

These are my settings:

I'm using Unity 2018.4.32f1 and AC 1.75.8

Could you please help me?

Comments

  • Set the Sorting Map back to affect Order In Layer, and set the Sprite Sort Point in your character Sprite Renderers to Pivot.

    If two characters lie inside the same Sorting Area, their Z-positions will be offset to correct their display. However, inside the Sorting Map, you'll need to define at least one Sorting Area for it to work.

    An alternative approach to this workflow is to instead rely on Unity's own sorting options instead of AC's Sorting Map. This can be done by going to Project settings -> Graphics in the top toolbar, setting Transparency Sort Mode to Custom Axis, and then Transparency Sort Axis to (0, 1, 0).

    You can still rely on the Sorting Map for character scaling, but you can then uncheck its Affect Character sorting? to have Unity control sorting instead.

  • edited November 2022

    Thank you very much, Chris! The second approach worked like a charm! I also tried the first one, but unfortunately, I wasn't lucky that much. If you have some time, we could make some experiments to test this fix too, but only if you don't mind, the solution is working anyway.

  • Thanks for the details.

    It looks like the Z-positioning is working now, but the remaining issue is likely a duplicate of an earlier-reported issue that should be fixed as part of v1.76.0.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.