In my game, I want players to be able to wear any avatar/bundle they want, but I also want combat to stay fair. Because different avatars can have very different body proportions, I’m trying to implement custom hitboxes with standardized sizes/positions.
Note: I have set heights and widths on players.
The goal is:
Players keep their actual visible avatar/bundle.
Combat uses consistent hitboxes for everyone.
A skinny/small bundle should not have a smaller hitbox.
A bulky/wide bundle should not have a larger or more spread-out hitbox.
My first attempt was to create fixed-size hitbox parts for each body part, then position/weld them to the matching character body part:
This did not work well because the hitbox part positions still depended on the avatar’s actual body part positions. For example, a wide avatar caused the arms and torso hitboxes to be spaced farther apart, while a skinny avatar made them more compact. So even though the hitbox sizes were fixed, the overall hitbox layout still changed depending on the bundle.
After that, I tried using a separate hitbox rig template. The template had all of the R15 body-part hitboxes correctly sized and positioned in a standardized body shape. I rigged the template with Motor6D`s like a normal R15 avatar, then tried to copy the real character’s joint transforms/pose onto the hitbox rig.
That also caused problems. Certain unusual bundles, especially avatars with very short or oddly proportioned arms, made the hitbox rig’s arms rotate or bend incorrectly. For example, while holding a tool, the hitbox arms ended up at the wrong angles or stretched backward.
So now I’m trying to figure out the best structure for this.
What is the recommended way to make fair, standardized R15 combat hitboxes while still allowing players to visually keep whatever avatar bundle they are wearing?
You might want to make the avatars blocky. It may or may not get rid of Rthro type avatars, but I don’t think going through the whole… scripting just to check the size of the Rthro isn’t a good idea, especially if it’s made up of meshes. You can’t exactly tell the size on those. (Although, I don’t exactly know how Rthro or bundles work)
As a suggestion, I would focus on weapon hitboxes rather than player hitboxes, and handle hits by detecting contact with the HumanoidRootPart (at least, that’s how I do it myself), correct me if I’m wrong.
The humanoid hitbox is pretty small and only takes up the torso, which is the opposite of what I was going for.
In the end I decided that it would be too complicated and laggy if I went down the path of having those very precise hitboxes. So I settled on having a standard, static hitbox which took up a majority of the body, yet didnt need to be moved.
Im definitely going to be updating the shape of hitbox, so that it covers as much of the body as possible, while keeping a realistic shape of where your bodyparts would be.
The arms move way too much when you’re playing, players would probably not even realize if they missed through your arm, especially if we have static parts taking up a lot of the space.