Forum rules - please read before posting.

Problem Player switching

edited December 21 in Engine development

Hi,

I have a small problem when I want to switch back to the original player which is Player 0. Player 0 is empty because I don't use a character for the main phases. It's just simple point and click without a character.

In player switching, I have several characters, I switch between characters by clicking on buttons on my UI depending on the character I want to use. For example, the B button to simply switch to character B (Player 1).

I also have a button to be able to siwtcher to the default characters so the Player 0 but the problem is that as the character in my list is empty I can't go back to this player. But since I don't want to use a player because as I said I don't want to use a character for the main phases, how do I go about going back to my Player 0 ?

Because even if for player 0 I add a prefab like for example a simple cube where I disabled the mesh renderer so as not to see it and add in an action list at the beginning of the level the fact of disabling the movements, the cameras are still in focus on the player.

I would like the player 0 to be like non-existent. I don't want the camera to focus on player 0 because it's just there for me to switch between characters.

Thank you for your answers.

Comments

  • When Player-switching is enabled, all Player fields need to be assigned - it can't work with an "empty" Player field.

    Using an invisible Player is the right way to get around this - you don't need a Mesh Renderer, just an empty GameObject with AC's Player component is enough.

    About the camera: are all these Players in the same scene? If so, you can check Replace old Player's position? to have the invisible Player take the position of the previous Player, so that the camera doesn't move.

  • Okay, thank you, I'll do it like this.

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.