Search Unity

Question Cant move two characters with ThirdPersonController script

Discussion in 'Input System' started by ssd, Jan 7, 2023.

  1. ssd

    ssd

    Joined:
    Jul 2, 2014
    Posts:
    5
    Hi,
    I am using unity 2021.3.16f1 and I imported the thired person starter assets. I am facing a problem when dropping more than one character to the scene as I can control only one ??!!
    I have dragged the PlayerArmature prefab into the playground scene but I can only controll the first one and matter what I try I can only control one character?!!
    I have looked into the ThirdPersonController script but there is nothing there that limits player control count?!
    I don't care if the camera follows only one player I only want to control multiple characters at once.
    Can someone help please
     
  2. ZingZangGames

    ZingZangGames

    Joined:
    Dec 11, 2020
    Posts:
    73
    So you're trying to controll two (or more) charcters at the same time, like when pressing W for example, both move forwards equally? Look if there's more than one EventSystem/ PlayerInput/ InputSystemUIModule in your scene as that might cause the problem. Having more than one playerinput per scene breaks quite a few things.

    If playing around with that doesn't help, posting the code for it (esp. for the input management and inspector values for a char) would be nice.

    Hope this helps!