Closed starliner-admin closed 1 year ago
Please try version 3.6.6 just release and let me know if problem persist.
its still there
I have the same problem, too. The animation looks fine on the server and host, but not on the clients.
Please try version 3.6.6 just release and let me know if problem persist.
Still happens in 3.6.7 Pro.
Please try version 3.6.6 just release and let me know if problem persist.
Still happens in 3.6.7 Pro.
can confirm
Please try version 3.6.6 just release and let me know if problem persist.
Still happens in 3.6.7 Pro.
can confirm
can also confirm with 3.6.7 Pro
Here's a NetworkAnimator update to try. Note that the pro features are not in this bundle. NetworkAnimator_Update.zip
Here's a NetworkAnimator update to try. Note that the pro features are not in this bundle. NetworkAnimator_Update.zip
It works. Thank you very much.
Now it works a litte bit but still buggy.
Standalone Client -> Host/Client is sync Horizontal and Jump. Forward is jump for 1 sec to 1 and after it drop to 0. Host/Client -> Client: Is completly not synced.
Here are my files to help investigation. Both are based on the FPS Land demo CharacterController.zip AnimatorController.cs.zip
[Client(Logging = LoggingType.Off)]
private void CheckInput(out MovementReplicateData movementReplicateData)
{
Vector2 movement = _gameplayActions.Movement.ReadValue<Vector2>();
bool crouch = _gameplayActions.Crouch.triggered;
Vector3 localDirection = new Vector3(movement.x, 0f, movement.y);
Vector3 worldDirection = transform.TransformDirection(localDirection.normalized);
// Update animator with movement direction.
_animatorController.SetMovementDirection(movement);
// Default to move action code.
ActionCodes actionCodes = ActionCodes.None;
// Jump action code.
if (_inputJump)
actionCodes |= ActionCodes.Jump;
if (crouch)
actionCodes |= ActionCodes.Crouch;
float rotY = transform.eulerAngles.y;
if (localDirection != Vector3.zero || rotY != _lastOwnerRotation)
actionCodes |= ActionCodes.Move;
_lastOwnerRotation = rotY;
movementReplicateData = new MovementReplicateData(
worldDirection,
localDirection,
rotY,
actionCodes
);
}
Now it works a litte bit but still buggy.
Standalone Client -> Host/Client is sync Horizontal and Jump. Forward is jump for 1 sec to 1 and after it drop to 0. Host/Client -> Client: Is completly not synced.
Here are my files to help investigation. Both are based on the FPS Land demo CharacterController.zip AnimatorController.cs.zip
[Client(Logging = LoggingType.Off)] private void CheckInput(out MovementReplicateData movementReplicateData) { Vector2 movement = _gameplayActions.Movement.ReadValue<Vector2>(); bool crouch = _gameplayActions.Crouch.triggered; Vector3 localDirection = new Vector3(movement.x, 0f, movement.y); Vector3 worldDirection = transform.TransformDirection(localDirection.normalized); // Update animator with movement direction. _animatorController.SetMovementDirection(movement); // Default to move action code. ActionCodes actionCodes = ActionCodes.None; // Jump action code. if (_inputJump) actionCodes |= ActionCodes.Jump; if (crouch) actionCodes |= ActionCodes.Crouch; float rotY = transform.eulerAngles.y; if (localDirection != Vector3.zero || rotY != _lastOwnerRotation) actionCodes |= ActionCodes.Move; _lastOwnerRotation = rotY; movementReplicateData = new MovementReplicateData( worldDirection, localDirection, rotY, actionCodes ); }
What types aren't working? Eg trigger float int. And to which side are they not working? Eg server to client, clientHost to clients, client to server to clients. Given you have client auth checked is owner making changes?
What types aren't working? Eg trigger float int.
Floats and trigger
And to which side are they not working? Eg server to client, clientHost to clients, client to server to clients.
- Standalone Client to Host+Client sync Horizontal Movement (float) and Jump (trigger) Vertical Movement (also float) only sync for one tick and after it drop to 0
Its like in this Video from @starliner-admin: https://user-images.githubusercontent.com/124756258/234179855-1e207266-6ee6-49ba-9460-fd4642a69466.mp4
Given you have client auth checked is owner making changes?
The NetworkAnimator is Client Authoritative. The Network Transform is Server Authoritative
it works fine for me. All the characters are client authoritative. Syncs everything bool, trigger and floats.
it works fine for me. All the characters are client authoritative. Syncs everything bool, trigger and floats.
@starliner-admin can you maybe share some example how you Implement it?
What types aren't working? Eg trigger float int.
Floats and trigger
And to which side are they not working? Eg server to client, clientHost to clients, client to server to clients.
* Standalone Client to Host+Client sync Horizontal Movement (float) and Jump (trigger) Vertical Movement (also float) only sync for one tick and after it drop to 0 * Host+Client to Client: Is completly not synced
Its like in this Video from @starliner-admin: https://user-images.githubusercontent.com/124756258/234179855-1e207266-6ee6-49ba-9460-fd4642a69466.mp4
Given you have client auth checked is owner making changes?
The NetworkAnimator is Client Authoritative. The Network Transform is Server Authoritative
I tested all value types + trigger. two clients + server, two clients + clientHost. Client auth, server auth, and server auth + send to owner. All tests passed.
If the value is synchronizing but then resetting you're probably changing the value locally by mistake.
I'll be closing this out upon release of 3.6.8. If you find there is a bug via help channel please feel free to re-open.
Can you maybe add a example in 3.6.8 how to use the NetworkAnimator correctly?
it works fine for me. All the characters are client authoritative. Syncs everything bool, trigger and floats.
@starliner-admin can you maybe share some example how you Implement it?
My scripts are NetworkBehaviour instead of monobehaviour and I destroy my script on other clients so that the animator modifications I make only happen from the owner client
public override void OnStartClient()
{
base.OnStartClient();
if(!IsOwner)
{
Destroy(this);
return;
}
}
Alternatively, u can check IsOwner flag before setting animator values.
private void Update()
{
if(IsOwner){
_animator.SetFloat(HORIZONTAL_HASH, _movementDirection.x);
_animator.SetFloat(FORWARD_HASH, _movementDirection.z);
_animator.SetFloat(PITCH_HASH, _pitch);
}
}
oops sorry I misclicked.
In my case Fish-Net 3.6.9 fixed this issue. I was using CSP.
this is fixed so im closing this
Unity version:2022.2.8f1 Fish-Networking version:3.6.5hf0.Pro
Describe the bug Network animator with client authoritative turned on not syncing with other clients. Only updates state on local client and server.
To Reproduce Steps to reproduce the behavior: 1) set up fishnet 2) set up an animated object with an animator and controller with parameters and triggers 3) add network animator to the object 4) add a script to set trigger in network animator on input and add it to the prefab 5) set the prefab as player object 6) build 7) run three instances of the build 8) set one as both server and client 9) set others as clients 10) CASE 1:trigger animation on one of the clients with input CASE 2:trigger animation on the server client with input
Expected behavior CASE 1: Animation plays on the instance the trigger was set on and, on the server, not the third instance. CASE 2: Animation plays only on the server instance.
Demonstration Video https://user-images.githubusercontent.com/124756258/234179855-1e207266-6ee6-49ba-9460-fd4642a69466.mp4