What hitbox system is the best?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to use a hitbox thats easy to adjust,
    Doesnt lag the game (although it has maybe 4 players max in a lobby so im not sure if lag will be a problem),
    And is relatively easy to use as this is gonna be my first game

  2. What is the issue? Include enough details if possible!
    There are lots of hitbox systems, like raycast. Im not sure which to pick.

  3. What solutions have you thought of so far?
    none, im making this post in advance.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
The game mostly has only melee weapons, unless you get lucky. it is a PvE game.

2 Likes

You could make a union (or a part if it isn’t a complex model of the weapon) that surrounds the weapon and weld it to the weapon that you have and then use a touched event to see if the thing it touched was another player and not the one holding the bat. You could easily adjust the hit boxes to your liking and the code wouldn’t even have to change. But I don’t know if this would be the best method for it. I don’t know how accurate it would be because I don’t really make fighting games and stuff.

1 Like

What type of combat would it be? Fast? Slow? Sword? Abilities? You said mostly melee what’s the other factor?

3 Likes

Fast, no abilities, the other 1 factor is a glock but i’d make it really rare or tedious to get

Fast combat means using part hitboxes aren’t a good idea since Touched events which is not even recommended might have too much delay. So your best option for fast combat is raycast hitboxes. Personally I would go with Raycast Hitbox 4.01: For all your melee needs! This is because raycasts are near instant so the meele would be near impossible to have lag. It’s also a module so it’s easy to implement.

1 Like

Thanks for that. It also works for tools, right? Because you’ll probably use tools for most of the game’s combat

Yes, a basic guide on how it works is it uses attachments inside the handle which then acts as a starting point. Then it creates raycasts like a trail starting from the attachment.

1 Like

I know it’s been answered, but I wanted to give another more “basic” hitbox solution that I’ve used. It’s super simple so perfect for someone starting out, and fairly popular. The video also explains it in depth.

2 Likes

I also ever heard of that hitbox, though i dont really know its postives and downsides

I’d say it’s more straightforward with very little setup involved, compared to RaycastHitbox linked above. I’ve actually made a combat system that initially used RaycastHitbox, over time I found it a bit annoying having to set up attachments and whatnot for each weapon – I ended up switching over to Muchacho Hitbox. It’s a lot less precise, but I didn’t need that high level of precision anyway.

It depends on your use case of course, but I’d highly recommend using that especially if you’re just starting out. For more advanced/complicated stuff, that’s when I’d recommend RaycastHitbox.

1 Like

How good would ya say it is for tools? melee weapons and stuff like that

It’s alright, I suggest you watch the video to see how to implement it.

The specific reason I switched over to this from RaycastHitbox is that RaycastHitbox kept losing precision because the weapon animations we’re using were too fast, so the only way was to define the are that the hitbox was supposed to hit.

  • trail of raycast following an attachement: It is the most accurate type of hitbox if you use a weapon.

  • basic raycast

  • touched funcion : simple but not really good for latency.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.