Animations in multiplayer

Hi guys
I wanted to make multiplayer game, but animations don’t really works. When i launched it (2 times to have two players) and move around, both players have animations. I want it to just apply for just the one i move.
I also tried turning off the script in the other entity. But when moving a player, from the view of the second player, it looks like its sliding istead of having animations
Can anyone help me pls
https://playcanvas.com/editor/scene/1321222
The project:
https://playcanvas.com/user/romanguyen

Hi @roman,

You will have to program your animation to start/stop based on the movement of the player they are attached to, not to window input.

Right now both players (local and remote) listen to keyboard input, you should do that only for the local player. Add some condition that checks if it’s the local player or not.

For the remote player you should trigger the animation based on the data that is transmitted. Either transmit animation states, or even better find the right animation state based on the type of movement that is being networked (this can be advanced).

Sorry for the late reply, but i wanted to try before bothering u again
I added the condition to check whether it’s local or remote player (it kinda works).
But i couldn’t do the animation thing through the network
Can u show it to me pls?

I also tried to do the gun shooting, but i guess it’s the same problem because the remote player can’t see the bullet

Game1 | Editor (playcanvas.com)