Character can't go above max walkable slope

Hi, I was testing some custom game modes in a game I’m working on. I decided to turn player friction down to 0, and put all the players in a sphere. my hopes would be that they would slide around and even be able to make full loops around the sphere. But I noticed that as soon as I reached the max walkable slope, my player would just stop even though it had plenty enough velocity to keep going. I created a simple side scroller, turned friction to zero, and then remapped jump so that when you press it it instead launches the character to the side. The exact same thing happens. Is there some fix to this? It really breaks the custom game mode I was trying to make.

Video of the side scroller test here:

You’ve almost answered your own question :slight_smile: Turn your Max Walkable slope up. You can also set this dynamically under specific conditions, say if velocity is greater than X.
I think getting the effect you want though, is going to be a lot harder than you think :stuck_out_tongue:

You see that’s the issue though, I want to keep my max walkable slope as it is. I would figure it would be easier to get being that it’s just seems like simple physics. I would assume that the max walkable slope only affects you when you’re trying to walk up it, not when friction is pushing you up.

Well yeah, that’s why I said, you can change the max walkable slope when the condition is right. So on tick, do a check to see if the character’s velocity is greater than X value, and when it is, set the max walkable slope to something goofy like 360, and when it’s not true, set it back to whatever you want your walkable slope value to be.
You’re soon to discover that physics in a game engine are not the same thing as real world, and that although it may look like your character isn’t walking, if the capsule is touching the ground, the engine considers that walking so he stops at the point in which the capsule comes into contact with the slope and it exceeds your slope angle which is exactly what you told it to do :stuck_out_tongue:
And during testing, see if you can get the result you want by screwing with the numbers and then when you get it working, you can worry about things like setting the max slope angle when the character isn’t moving fast enough.
You need to specify the conditions under which you want the behavior to change, the engine isn’t going to figure it out for you.

The Character Movement Component is not physical. It is designed to give robust movement behavior for an FPS-like humanoid character, prioritizing things like “stick to the ground even when running forwards down a slope” over things like “physically correct behavior.”

If you want physically based movement, you should not use the CharacterMovementComponent (or perhaps use a custom movement mode) and either use rigid body simulation that you drive with forces and torques, or write your own controller component.

Oh trust me, im not new to this at all, I’ve been developing my game for 2 going on 3 years, so I am well knowledged that game physics are not the same as real world physics.
That being said if I push a ball at that half circle it will go around it, hence why I said “basic physics”.
Also to my knowledge you can’t make the walkable angle more than 90.
And yes, I know the engine isn’t just going to figure it out for me, again not new to this by any means.
Thanks for the response!

Yeah, I found that out very early on, I just figured something like this would work easier, guess not though. But I have been developing this game for 2 going on 3 years, and it’s somewhat of a movement shooter, so it’s kind of late to try and change the movement to physics based, since I would have to completely revamp everything. Thanks for the response though!

Yeah, no worries. Your player is not a ball though. Do this with a ball and you will get the results you want. I’m telling you, it’s a really simple solution to just turn up your walkable surface angle and see if you get the results you want. If you do, it’s relatively simple to do a check for velocity as a way to allow the player to walk up a wall. And you don’t have to do it on tick. If you’ve got a button press for that dash which I imagine you do, then just increase it when the button is pressed and decrease it when it’s not. You don’t even need to do a velocity check at that point.

Either way it doesn’t work. You can’t set max walkable floor angle higher than until they get halfway up, then just stop abruptly. I don’t see a way of fixing this at this moment.

Sorry I’m not following. If you set the max walkable slope angle to 90 degrees, and set the step height high enough, you’ll be able to walk up a cliff. Granted it’s instantaneous, but it would bypass your issue. I think maybe you’re assuming it’s the max slope angle that’s stopping you when it might not be. It’s likely got something to do with how the movement component is set up and the capsule collision. There’s a node called Launch Player that can help fix some of these types of issues by placing the player into an “in air” mode before the dash. But the engine is going to be waiting for that moment you contact the ground again and then it’ll set you back into a “walking” mode automatically. That’s likely the source of your problem. I might actually look into creating a separate pawn that isn’t a character with a sphere collision and switch to that during your dash, and then back to your regular player pawn when not but there’s likely a more elegant solution. Like I said, this isn’t something as simple as a physics simulation and just getting a ball to roll up a slope. There’s a free plugin on the marketplace for allowing players to walk up walls. Might be worth looking for that. I think it’s called Ninja Character Plugin. There’s also another called Directional & Planet Gravity.

I think you miss understood. I’m not trying to get the character to climb up slopes or cliffs. I’m making a fps (sorta like Halo) and have some custom games options. some of those affect the friction. I was wanting to make a game mode where players have no friction and can slide around a sphere (on the inside ofc). The issue is that I’d like them to be able to make full loops around it, but once they reach a floor angle that is greater than the max walkable angle, they just stop. In the video example the curve keeps going and loops back around. But like I said earlier, there doesn’t seem to be a good fix for this.

I’m also just confused as to where the claim that I have a dash came from. I never mentioned having one.

Yeah, I understood what you’re saying. I don’t know how to solve it off the top of my head, but it’s not as simple as removing friction and letting them slide around. You’re going to need a solution to handle allowing them to actually navigate a full circle first cause you’re not gonna get that with a physics-based solution. At least not easily. That’s also why I suggested trying to get it working with a sphere. If you can, then you could easily switch to a pawn with a sphere collision in those moments. You’re certainly not likely to get it working with the character pawn unless you add a lot of custom code. Hence the Ninja plugin. It’s got the code customized for you to a point where you might be able to adjust it a bit more to do what you want. At least more easily than doing it from scratch. It was just a thought. But seriously, create a sphere pawn and see if you can get it to do what you want. Pretend you’re making marble blast. Then you can figure out if the slope angle has anything to do with it. I don’t really think it does.

I just don’t think im gonna worry about it too much. This is just one of those things that I thought would be fun, but in the big scope of my game, this wouldn’t really affect too many players. it’s just a fun “player made” game mode, so it’s not a big deal. Thanks the the suggestions though