Renamed `AuthorityState` to `AuthoritativeState` for consistency.

This commit is contained in:
Jaedyn Draper 2024-03-13 16:54:52 -05:00
Родитель 772c54b6c5
Коммит 22356c49ce
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -182,16 +182,16 @@ namespace DefaultNamespace
// just reuse the same method here with no problem.
Move(inputs);
// Server can use Smoothing for interpolation purposes as well.
MyTransform.Smooth(currentPosition, MyTransform.AuthorityState, SmoothTime);
MyTransform.Smooth(currentPosition, MyTransform.AuthoritativeState, SmoothTime);
}
public void Update()
{
// The "ghost transform" here is a little smaller player object that shows the current authority position,
// which is a few frames behind our anticipated value. This helps render the difference.
GhostTrasform.position = MyTransform.AuthorityState.Position;
GhostTrasform.rotation = MyTransform.AuthorityState.Rotation;
GhostTrasform.localScale = MyTransform.AuthorityState.Scale * 0.75f;
GhostTrasform.position = MyTransform.AuthoritativeState.Position;
GhostTrasform.rotation = MyTransform.AuthoritativeState.Rotation;
GhostTrasform.localScale = MyTransform.AuthoritativeState.Scale * 0.75f;
}
// Input processing happens in FixedUpdate rather than Update because the frame rate of server and client

Просмотреть файл

@ -94,7 +94,7 @@
"com.unity.nuget.mono-cecil": "1.10.1",
"com.unity.transport": "1.4.0"
},
"hash": "ef792ef4177a4ca5efde322d3adbf79cd68b6ba5"
"hash": "227a33222f0b796c37fbdcab2641592f5310301b"
},
"com.unity.nuget.mono-cecil": {
"version": "1.10.1",