Projectiles Block Per Second

Discussion in 'Spigot Plugin Development' started by 1Mangomaster1, Oct 9, 2019.

  1. I have a projectile moving at a certain speed, but I'd like to control the speed better. How can I make so I can control exactly what speed the projectile will go, for example: How many blocks per second it will pass?
    I appropriate every comment! :)
     
  2. Have you tried anything? 1m/s is 1 block per second.
     
  3. I have tried, and yes, I do know that one meter per second is a block per second, but how do I even calculate meters in a game that does not give me anything about meters...
     
  4. Just multiple the projectiles vector to the speed you want is a super simple way
     
  5. double speed;
    Projectile projectile;
    projectile.setVelocity(projectile.getVelocity().normalize().multiply(speed));

    Where speed is the amount of blocks per tick.
    speed of one => 1 Block/Tick = 20 Block/Second
     
    • Winner Winner x 1
  6. Oh.. rip.. I apparently did it the whole time with 1 BPS(Block per second)... I didn't even notice it, but thank you for your comment, it was very helpful :)