My Player is not moving smoothly when I connect to different network.

Options

Hello, I am using Photon Fusion for my game and it is working perfectly. My player movement is not syncing when the network is changed. When the network is the same, it works fine. Otherwise it glitchy. Idk what is the problem, I need help.

Comments

  • WARdd
    WARdd ✭✭
    Options

    What exactly do you mean when the network is changed?

    It sounds to me like you just haven't set your interpolation up properly, in that case:

    Does the player move via a NetworkedCharacterController? Via a NetworkRigidbody? a NetworkTransform? If so do you have a valid InterpolationTarget object? Are all your visuals parented to that InterpolationTarget? Are physical colliders NOT parented to interpolation? Are you moving the player properly via its networked controller?

  • Balongi
    Balongi
    edited March 2023
    Options

    @WARdd I mean that when I play on the same Internet it works fine, but when I play on a different Internet it does not work at all. No glitch, no input delays on same Internet, but when I connect to a different internet and the other players are different its start glitching. I am using Rigidbody to control my player.

  • Balongi
    Options

    @WARdd I use a Rigidbody to control my character. The game works perfectly when I test it with my editor on the same internet. It also works when I send it to someone and he plays with me on the same internet. If I'm on one internet and the other player is on another, the client player's movement gets delayed and glitchy. Unfortunately, it doesn't work. I would really appreciate it if someone could help me.

  • WARdd
    WARdd ✭✭
    Options

    In that case the character should have a NetworkRigidbody script.

    Everything visual should be parented under a transform set as the InterpolationTarget for that NetworkRigidbody.

    Any movement or forces you apply should occur in FixedUpdateNetwork.