Hitbox Change.

Discussion in 'Spigot Plugin Help' started by LeoonPvP_, Jan 19, 2019.

  1. I would like to make a players hitbox bigger. I wan't to know if it's possible. I use to play a combo fly server where it was really fun to play since players with not good aim would always land a hit since hitbox where bigger. Is there any options for this?
  2. md_5

    Administrator Developer

    Thing is even if you make it bigger server side, the client won't send a "hit" unless it already thinks it hit the players hitbox.

    The only option would be a plugin that looked for arm swings and checked if directions vaguely matched.
  3. And how can i do that? or what would be the best way to do that. Is there any code that i can use as a reference?
  4. Honestly, it’s very complexe, cause you have to check it the hit was near enough to the player, but player’s position is based on their feet, so you’ll have to get this position on all the player’s height. If you want a dev to do that, it will cost you between 20 and 60$ for the dev’s job. I was searching for ressources but didn’t find any.
  5. A lot of people are asking these sort of questions. Perhaps I should make a plugin to accomplish this.

    As md_5 said, you'll need to check arm swings. This requires packet interception, so I suggest using ProtocolLib for this.

    Specifically, you want two things for decent server-side hit detection:
    1. Precise AABB/ray intersection test
    2. Lag compensation
    I think this is a good AABB/ray utility and I highly recommend you take a look into it: https://gist.github.com/aadnk/7123926

    Lag compensation is essential for optimal experience. You don't want players with +200ms ping getting frustrated because their hits don't land. This happens because these people are actually aiming at the target's location +200ms in the past. To mitigate this, I suggest you track at least the last 20 positions (with timestamps) of every player on the server. When player A (with 200ms ping) wants to interact with player B, you will choose the position of player B closest to 200ms in the past. More info below:

  6. md_5

    Administrator Developer

    There's an event...
    • Useful Useful x 1
  7. Oh crap, you're right. Didn't even notice. That'll make life a lot easier.

Share This Page