Forum rules - please read before posting.

Multiple Players - Z-Index "sorting" not working after using teleport

edited October 2022 in Technical Q&A

Hi all,

I have player-switching in my game. So it's possible, that there are up 2 two inactive players in a scene and one active player walking around.
They all use the same default sorting map of the scene. So it high likely that an inactive player has the same "order in layer" as the player.
AC normally takes care about the player to be able to walk in front and behind the inactive player by using the z-index, as far as I understood. This works fine most of the time.

To position the current player I sometimes use "Object->Teleport". It seems that after I do that, the z-index sorting is not working anymore. The player e.g. walks behind a inactive player, but is shown in front.
image

If I save this scene and load it again, the z-ordering seems to be back in place and it works again as expected.

Any Idea how to fix this?
As I'm only 4 weeks before release I don't want to switch the AC version, not to risk the announced release date. Is there an workaround or code change I can do to get rid of this problem?

AC v: 1.75.4
Unity Version 2020.3.14f1

Best,
KaiB

Comments

  • Check that all Markers and PlayerStarts have the same position on the Z-axis, but this may be a duplicate of this issue.

    I shared some advice in that thread about how to rely on Unity alone for sorting, but PM me if you'd like a potential fix to test.

  • I have checked all Markes and PlayerStarts. All have Z-axis: 0. So this should be fine.
    I will send you a PM.

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.