Hey again! I was away for a few days, but I saw your reply on the other thread and decided to do some experimentation.
In order to test out the issue of the slow falling against the wall (from the other thread), I dug up a module that I made a while back that—incidentally—aims to mitigate the exact issue you mention right here. I wanted to ask on the other thread if you were perhaps using a custom movement system because of the sliding issue, but I felt it would be too off-topic.
Anyway, to start off, here’s a testing place: Project: Player Speed Movement Damping - Roblox. I updated the interface and map a little bit in response to your threads.
Addressing sliding
Sliding is just the effect of slow acceleration. If you do intend to stick with the LinearVelocity movement, then this should just be a matter of changing the acceleration function. Wherever you’re handling acceleration in response to user input, just bump those terms up a little bit and you should feel some better control.
With default movement, the issue shows itself at higher speeds. Addressing it is relatively simple, though. You determine where the user wants to go by reading their character’s movement vectors with respect to their input (WASD, stick, etc.); and then you apply a counteracting force to the player’s character whenever there’s delta between the user input and the actual movement vector of the character. It’s essentially a subtractive PID controller.
This results in better handling for your characters.
Sticky walls
The above is great in a vacuum! But we start to see the issues that were hidden before:
And comparing that to what happens without the damping:
And just to confirm my suspicions, I trialed it with just the normal 16 walk speed and no movement modifications.
It’s almost as if there were a frictional force from the wall…
There are a few oddities here. First of all, our character is super bouncy. Obviously if we threw a real, inelastic object with this kind of velocity at a solid wall, it would either shatter or splat. Without damping we just bounce off, and that’s kind of the next best thing. The only difference between the damping and sans-damping trials is that of the accelerations. The damping almost immediately counteracts the force from hitting the wall, so when I keep my forward key pressed down, the merits of applying that “force” from my keyboard input are more apparent than that of the keyboard input without the damping.
This broaches the second inconsistency. In real life, we can’t just apply a force to ourselves from some extradimensional controller. We move ourselves by applying a force in an equal and opposite direction of where we wish to move. To walk forward, I push my legs backward against the earth. The character in Roblox (and most games for that matter) don’t do this. The keyboard input is that extradimensional force that moves them, which looks fine for the most part, but it looks very odd when we’re able to freely accelerate our character in mid-air. In this particular instance, we’re finding ourselves able to apply an invisible and unrealistic force strong enough to hold our characters against a wall.
There are a few ways to tackle this, but I think I’ll opt to restrict mid-air movement in my module. By limiting mid-air movement, the player won’t be able to generate enough “5D force” to keep themselves pressed against whereas they should be falling.
So yeah, it’s another out-of-the-box interaction and otherwise logical interaction that can result in unsatisfying movement. The only solution is to build around it. I’ll probably work on something since the movement damping exaggerates the effect at high speeds. But for now, I’ll just refactor the module and post it here when I’m done. Of course, you can also try implementing it yourself. Like I said, it’s not too complex.
I know this is an answer for two separate topics, but I feel that they are interconnected enough to warrant one big answer rather than two small and somewhat redundant ones. Also, I apologize if some of this is incoherent. I’m operating off of a few hours of sleep, and I tend to get a little “preachy” when I’m tired. Lol.