I’ve been working on this diving system for a platformer. Right now it has collision detection that scans 4.5 studs directly in-front of the HumanoidRootPart for a collision, shown here:
However, people can skim across walls by lining up parallel with a wall, then angling their body slightly towards it. The result is as follows:
Does anyone have any proposed solutions that I could try and implement to keep this from happening? Thanks!
Make sure you don’t base it on the arms, and instead offset from the HumanoidRootPart. Otherwise, the rays will incorrectly hit the ceiling, ground, etc. because of how the arms swing.
You may also want to try rays at an angle, perhaps 20 degrees left/right, from the root part, as the arms may be inside the object you’re trying to detect.
However, I opted for casting 4/5ths of the way to each left/right face on the torso, so approx. 0.8 studs away from the HumanoidRootPart in either direction, therefore allowing people to dive exactly parallel to walls with an arm inside of it (just because players’ arms don’t have collisions).