"Mirrored" Opponent

Options
I have a problem. My game has specific game field which consists of two parts. For example: top and bottom. On the bottom side located player who directly play from the device, on the top side - his opponent. Bacasue the game is online all player moves must be displayed on the screen, opponents moves must be reflected on the players screen from top side. Game examples: Hearthstone, Clash Royale.

Best Answer

Answers

  • iKethavel
    Options
    illogiK said:

    Hi iKethavel,
    I made a belote card game and I had this problem too...
    For me, i just set a master UI where player's field are at the bottom of the screen and enemi's field are on the top of the screen.

    Then, when I instantiate the players, I check if my player is on spawn 1 or 2 (1 is bottom, 2 is top).
    If my player is 1 I init my camera with Y rotation to 0, else, to 180.

    The Ui doesn't move with camera rotation so I made it that way.

    In my case this is more complexe because this is a 4 players game, and everyone had to have the good position with each other. So my camera rotation is 0, 90, 180, 270. But it work perfectly.



    Thanks for answer. It helped me!)