Physics Character Controller Step Height

Yo @Cedric … How do we control the STEP height… the max height of the steps the controller can climb.

As an example in Unity , On the Character Controller, there was a StepOffset property thhat specfied the max step up height

Nevermind… Found it:

characterController.maxSlopeCosine = 0.2;

Lets ie climb larger steps… Can you verify that is the proper way to set step height ?

Hey @MackeyK24

Yes, that’s the correct approach. The filtering is based on the plane’s inclination, hence the cosine of the angle.

In fact, it‘s not the correct approach,this maxSlopeCosine property is used to determine how much slope the character can move and walk on, rather than saying that this property can also be effective when there is an object with a cosine of 0 and a height of maxStepHeight in front of the character. For example, when there is a staircase in front of the character, but the first staircase of the staircase is slightly higher, even set the maxSlopeCosine to 0.1, it is not possible to walk directly. At this time, if a maxStepHeight parameter is added to determine whether the object can cross or move, it may be more effective. I have seen that PhysicsCharaterController applies the SimplexSolverSolve algorithm, but I have not yet understood how to modify it. Can you provide help ?@Cedric

Is it possible to be implemented in PhysicsCharacterController?

It’s always possible :slight_smile: Let me take some time beginning of next week to see how to do it properly.

Thank you so much for your help. I’ve been struggling with this for a while now. I’ve carefully reviewed your code implementation, and it’s truly an outstanding piece of work. I’m really looking forward to your solution.