Search Unity

Question Help with switching NetworkTransform into ClientNetworkTransform

Discussion in 'Multiplayer' started by blakstar123, Jan 5, 2024.

  1. blakstar123

    blakstar123

    Joined:
    Nov 7, 2023
    Posts:
    9
    Hi,

    I'm working with Boss Room sample, and want to test client-authoritative sync mode.(I want to check player movement react fast even while on network is not stable)
    I found ClientNetworkTransform class, which is already included for this purpose.

    So I detached NetworkTransform from Character prefab, and attach ClientNetworkTransform instead, while keep every options identical.

    However, player character does not move anywhere on client user device, while character on host user device works well....

    What did I miss?
     
  2. b4guw1x

    b4guw1x

    Joined:
    Apr 16, 2020
    Posts:
    39
    If do you have rigidbody on your characters, can you add network rigidbody to characters?
     
  3. blakstar123

    blakstar123

    Joined:
    Nov 7, 2023
    Posts:
    9
    I've added NetworkRigidbody, but not work as well. Character worked perfectly well with NetworkTransfrom component without any modification, but does not work with changing it into ClientNetworkTransfrom. The only difference is that authority mode for NetworkTransform.
     
  4. blakstar123

    blakstar123

    Joined:
    Nov 7, 2023
    Posts:
    9
    Got it. I needed to move movement logic from server side to client side.
     
    b4guw1x likes this.