A few months ago I managed to fix glitching/moving into walls in my custom movement/character controller (inspired by Source engine movement). My approach was to fire blockcasts in every direction (including diagonals, up, and down). This gave me a reliable ground distance from the root part to the surface below, as well as proper wall collision. Here’s the main bit of the collision response:
if castResult then
local normal = castResult.Normal
local projection = adjustedVel:Dot(normal)
if projection < 0 then
adjustedVel -= normal * projection
end
end
1. What do you want to achieve?
I want to properly handle angled surfaces without the character sliding down.
2. What is the issue?
When the player stands on angled surfaces (slopes/ramps—even very shallow ones), the character starts sliding down. The steeper the surface, the faster the slide.
3. What solutions have you tried so far?
I found a post from someone with the same problem, but their controller worked differently, so I couldn’t apply their fix. Haven’t figured out a good solution yet.
please share any solutions or ideas if you have, thanks for reading!