Search Unity

Question Making Unity Netcode and First Person Controller -asset work together on Client

Discussion in 'Multiplayer' started by herra_lehtiniemi, May 5, 2022.

  1. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    I'm using the standard FPC-asset from Unity StandardAssets-package. I'm spawning local player and remote player from the same prefab using the FPC. For local player I enable First Person Controller and CharacterController and for remote player I disable them. The player object has NetworkObject and NetworkTransform. When I move the object on Host, it works fine, but when I move the object on Client, it tries to move, but NetworkTransform-script locks the movement. In other works - how can I control a spawned character with FPC-script? Does FPC try to move the character in a wrong way somehow, does Netcode expect direct transform manipulation?
     
  2. firebasedemo877

    firebasedemo877

    Joined:
    Jan 13, 2023
    Posts:
    1


    I just Destroyed the FPC,PlayerInput and Starter Assets Scripts if not Owner and used the ClientNetworkTransform. Keyboard Input for client doesn't work in ParallelSync. Used Joystick Input on client and works fine.