Skip to content

Commit c79e85b

Browse files
authored
Merge pull request #326 from Unity-Technologies/bugfix/GOMPS-522
[GOMPS-522] fixes character jitter in high packet loss scenarios
2 parents a2a3886 + ae54f56 commit c79e85b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Assets/BossRoom/Scripts/Shared/Game/Entity/NetworkCharacterState.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ public void InitNetworkPositionAndRotationY(Vector3 initPosition, float initRota
4545
/// <summary>
4646
/// The networked position of this Character. This reflects the authoritative position on the server.
4747
/// </summary>
48-
public NetworkVariableVector3 NetworkPosition { get; } = new NetworkVariableVector3();
48+
public NetworkVariableVector3 NetworkPosition { get; } = new NetworkVariableVector3(
49+
new NetworkVariableSettings() { SendNetworkChannel = MLAPI.Transports.NetworkChannel.PositionUpdate });
4950

5051
/// <summary>
5152
/// The networked rotation of this Character. This reflects the authoritative rotation on the server.
5253
/// </summary>
53-
public NetworkVariableFloat NetworkRotationY { get; } = new NetworkVariableFloat();
54+
public NetworkVariableFloat NetworkRotationY { get; } = new NetworkVariableFloat(
55+
new NetworkVariableSettings() { SendNetworkChannel = MLAPI.Transports.NetworkChannel.PositionUpdate });
5456

5557
/// <summary>
5658
/// The speed that the character is currently allowed to move, according to the server.

0 commit comments

Comments
 (0)