Can two players provide input for one network object?

Options

I am trying to create a game where two player's control one object. Player one controls the objects movement and player two controls object shooting (e.g. a tank: one drives whilst the other shoots).

I wanted to know if this was possible with Fusion and if so what would be possible methods for achieving this? Currently, I am thinking of creating a network object for each player then combining them under one game object during the spawning phase.

Comments

  • Hi,

    It's not possible to have multiple inputs for the same NetworkObject, but you can have two different NO each one with a different input authority. (e,g one being the body of the tank and another the tank barrel)

    -----

    Isaac Augusto

    Photon Fusion Team

  • Taran
    Options

    Hi,

    Thank you for your response. Would a prefab structure like this then be suitable?:

    Tank -> Body (NO: player 1 input auth. Tank is parent) -> Turret -> (NO: player 2 input auth. Body is parent)

    Also would It be better to create and spawn one prefab which encapsulates everything (spawn and set input on player 1 join and only set input on player 2 join) or create two prefabs (one for the body and one for the turret) then combine them after spawn (spawn body prefab on player 1 join. Spawn turret prefab on player 2 join. Set body as turret parent across all clients)?