As a Roblox developer, it is currently too hard to create a custom collision for the default R15 Humanoid character controller.
A mention from here.
In most games, the player model is represented by a single mesh, that has animations and etc. the collision of the player can be represented by one single hullbox similar to the AABB.
With only the Hullbox as the collision, it is easily possible to implement Crouch. But not only Crouch, but any kind of thing, even Military Prone positions that is even lower than Crouching.
This includes creating any kind of custom characters, like Spiders or any other sort of thing. With a Hullbox it’s possible to precisely determine a fixed collision box size to walk through things.
Â
A Roblox Character, or the R15 by default has 15 parts + the HumanoidRootPart. These parts by default have CanCollide set on true
.
I can set all the CanCollide to false. But as soon as I jump, UpperTorso and LowerTorso get CanCollide set back to true.
I can change the CollisionGroup, but it’s not sufficient enough, because the HumanoidRootPart needs to be in the same CollisionGroup as the “floor” it is supposed to collide with or else you will fall through the world. But I can set the RootPart’s CanCollide to false, without falling through the world.
Â
So the next proceedor would be to parent a Collision Box.
But also this is not really do able because of the Humanoid. If the Collision Box collides with the floor, you just start sliding through the entire Baseplate.
This is not an exact good Hullbox but it demonstrates what it should do.
I used AlignOrientation and AlignPosition to fix its size but align it to the HumanoidRootPart. The Collision Hullbox is not allowed to rotate and needs to maintain an upright position at all times.
Here’s an example. When I used a WeldConstraint without the Align instances. It would Tilt.
You could use a Stadium, to smooth corners but even then, it would tilt anyways.
The purpose of the Collision Box is to block any unpassable things 100% the only exception is the floor and maybe a few other things, but the floor.
The collision box thing could have worked out. But a few issues occured:
- Since the collision box is a BasePart, when jumping and landing, you’d bounce back up and are forced to change Elasticity.
- If you jump up while there’s a ledge above the corner of the collision box, the collision box could glitch out in physics, due to the way I tried doing it.
- You can’t go up slopes, because you can’t control the Humanoid and it’s RootPart.
Â
Of course I can resize the HumanoidRootPart, though I think it resizes on its own too…
Setting the HipHeight to 0 makes the player slide, and setting it to 0.01 causes the Hullbox to go up, by a little bit.
And I can’t tell the Humanoid instance that it should do MaxSlope calculations on the custom collision box as well.
Though eitherways, that’s not a true AABB Collision Box.
Â
If this issue is addressed, it would improve my development experience because
It would allow to easily implement collision based things + Zone detection as you’d be focusing on one single thing only. But mainly it’s because of the collisions.
The Humanoid and HumanoidRootPart, both assemble something that we can’t see. We can only modify HipHeight and MaxSlope, where upon modifying it, the character just falls down. It is not
precise.
One would have to get rid of the entire Humanoid mechanic and do their own thing. This would mean that you can’t use the default character anymore, nor support HumanoidDescription, which would mean no avatars.
Â
The other issue is that Jumping also has its own way. And can’t be changed, like you can change Health by creating a Script.
If it would be possible to tell the Humanoid instance to use a different box just for the collisions, it wouldn’t be bad.
Aslong it stays upright and doesn’t rotate, it is fine.
The reason why it isn’t supposed to rotate, is because if it would, the physics would glitch and the hullbox would not have a purpose.
So if you’d crouch and rotate, your character would glitch, hullbox is always at a fixed origin and orientation.