Skip to content

Commit 4ca899a

Browse files
committed
moving position and rotation to MLAPI's PositionUpdate channel (sequenced, unreliable). This significantly improves user experience in high-packet-loss scenarios
1 parent a2a3886 commit 4ca899a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ 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.

0 commit comments

Comments
 (0)