Making a bow that never misses

Discussion in 'Spigot Plugin Development' started by Technerder, Apr 28, 2017.

  1. essentially making a bow, and when it fires it would help guide the arrow to allways hit the player. Any ideas? Not asking for code but if you feel like it, i dont mind!
     
  2. You could get the predicted path of the arrow and it's landing point, get the distance from the player you are trying to hit, then apply velocity to the arrow in the air to compensate for the distance between.
     
  3. I'd really like to see how its done because I don't even know if it's possible to modify an arrow and just make the packet look like it was hitting..
    It's really hard if it is xD
     
  4. Why do you need to make it look like it was hitting something? Apply a velocity to the arrow. If you want, you could shoot an invisible arrow with collision, get where that lands, then calculate how much force is needed.
     
  5. NathanWolf

    Supporter

    I believe the client does its own interpolation for how it expects projectiles to travel, so this may look weird. You can easily see this effect if you set a projectile to a high speed- particularly noticeable for fireballs (they'll glitch around) but noticeable for arrows at high speed as well (they appear to diverge from their path) though in both cases they will hit what the server says they hit.

    If you really want to go this route you could use an armor stand with an arrow mounted on it and fake it with teleportation, still might look a little weird though.
     
    • Agree Agree x 1