Fusion Network Transform Interpolation

Options

I work on 3d character movement with the navmesh agent.

and I use network transform to sync all characters and I found.

if I use interpolation data source: auto

our character (has state authority) is small shaking

another character (not has state authority) is smooth


if I use interpolation data source: Not Use

own character (has state authority) is smooth

another character (not has state authority) is small shaking


can I achieve smoothness in both my own character and another character?

Best Answer

  • ramonmelo
    ramonmelo mod
    Answer ✓
    Options

    Hi @Yosan ,


    Yes, you can modify the NetworkTransform component in realtime to get the best result in both cases, just include the following code inside the Spawned callback:

    public override void Spawned()
    {
      //...
    
    
      if (Object.HasStateAuthority)
      {
        GetComponent<NetworkTransform>().InterpolationDataSource = InterpolationDataSources.NoInterpolation;
      }
    }
    

    And it should work as expected.


    --

    Ramon Melo

    Photon Fusion Team

Answers

  • ramonmelo
    ramonmelo mod
    Answer ✓
    Options

    Hi @Yosan ,


    Yes, you can modify the NetworkTransform component in realtime to get the best result in both cases, just include the following code inside the Spawned callback:

    public override void Spawned()
    {
      //...
    
    
      if (Object.HasStateAuthority)
      {
        GetComponent<NetworkTransform>().InterpolationDataSource = InterpolationDataSources.NoInterpolation;
      }
    }
    

    And it should work as expected.


    --

    Ramon Melo

    Photon Fusion Team

  • Yosan
    Options

    Thank you very much it work.