Setting Player Velocity to the same on X and Z makes movement slow

Discussion in 'Plugin Development' started by VortexGmer, Aug 8, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Hi! I am basically trying to create a zero gravity environment and ran into a problem. First I tried doing this to set the Y velocity
    Flystr is the hashmap that contains the player strength of flight
    That did nothing.
    Next which is what is the problem is I did this:
    p.setVelocity(new Vector(p.getVelocity().getX(), flystr.get(p), p.getVelocity().getZ()));
    as you can see, I am setting the player x and z velocities to whatever it was before.
    But this makes a wierd slow sluggish movement that I don't like.
    How would I get rid of this?
  2. Offline


    I doubt you can: everytime you change the velocity of a player on the server, the client gets slightly 'set back' / interrupted in its current movement, because the client is expecting a different movement than you force on the server slightly afterwards.
Thread Status:
Not open for further replies.

Share This Page