Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Help needed] New input system and DOTS, multiplayer not working.

Discussion in 'Input System' started by WAYNGames, Jan 19, 2020.

  1. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    988
    Hello,

    I'm making a tank demo game using the new input system and DOTS with basic mechanics (move/aim/shoot).
    I managed to make thing work with both the keyboard/mouse and a gamepad.
    I made aplayer plrefab to use with the player input manager. the player gets instanciated and converted to entity when joining. a reference to the nécessary entities are stored and when reding the inputs, i assign the read values to the correct entities.

    All work perfectly when only one player is active.
    However when the second player joins, the first still work perfectly but the second can only aim, it can't shoot, nor move.

    It's always the second player to join that get the issue whatever the input divice.
    In the entity debugger I do see the data set correctly for both players, so teh data is read and passed through to the entity but for some reason it has no effect...

    You can download my project here : https://github.com/WAYNGROUP/MGM/tree/Multiplayer-issue

    Connect 2 input device (gamepad an keyboard/mouse)
    Open Playground scene
    Press play
    Press any key on each input device
    Try to move with WASD or gamepad left stick
     
  2. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    988
    My bad was using a return in the chunk job loop effectively skipping the processing of other entities...