Solved Client-side Player Leg Move Animation? Packets?

Discussion in 'Spigot Plugin Development' started by SkylixMC, Feb 24, 2020.

  1. Hello everyone.

    First, some background. I am making a plugin that lets you control another player's action. (Basically where ever the "host" player moves, the "target" player will move there too). At this time, I am doing this by mass teleporting the player using the Player#teleport method whenever the "host" fires a PlayerMoveEvent.

    The issue I am currently running in to is that on the CLIENT SIDE of the player who is being teleported, there is no "move animation". In other words, the player's leg remains solid on the client-side (however, if viewed by an external player, the player's legs are moving).

    Here is a video to show you what I mean.


    So the question is, is there any way to fix this? Although I am very new to packets, I have tried playing around with packets and can't seem to fix this.
     
  2. No, I didn't try that. I will give it a shot and get back. But I personally doubt it will because last time I played around with velocities, I noticied that a player's xz velocity is actually 0 when walking. But perhaps some combination of teleport and setVelocity could yield the desired effect... I will get back to you guys tommorow.
     
  3. Wow, it actually does appear so that setting velocities does generate the leg movement animations on the client. I think I can work something out from here. Thanks a lot!
     
  4. Awesome, hope it all works out!
     
    • Like Like x 1