mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Fix network animator doesn't sync float value as expected (#589)
Maybe we should do float sync when the Abs of newValue - lastValue > 0.001f
This commit is contained in:
parent
b0ef89a0d9
commit
dea7b58792
@ -230,7 +230,7 @@ bool WriteParameters(NetworkWriter writer, bool autoSend)
|
||||
else if (par.type == AnimatorControllerParameterType.Float)
|
||||
{
|
||||
float newFloatValue = m_Animator.GetFloat(par.nameHash);
|
||||
if (Mathf.Abs(newFloatValue - lastFloatParameters[i]) < 0.001f)
|
||||
if (Mathf.Abs(newFloatValue - lastFloatParameters[i]) > 0.001f)
|
||||
{
|
||||
writer.Write(newFloatValue);
|
||||
dirtyBits |= 1u << i;
|
||||
|
Loading…
Reference in New Issue
Block a user