- Home /
Character Motor won't go up stairs.
The above. I go to walk up a set of modeled stairs, and often the player can not get up at least one of the steps. Is this a bug in Unity 3's character motor, or is this something happening on my side?
Answer by diabloroxx · Dec 22, 2010 at 11:14 PM
I had a similar problem. I changed the collider of the staircase to a slope. Create a box collider and change the scale and rotation to match that of the stair case. Works like a charm. If you have round staircase, am sorry this won't work.
Answer by Proclyon · Dec 22, 2010 at 11:10 PM
Could be several things. Like Peter G suggested, the inclination of the plane could be a mismatch for the character step offset resulting in your situation as you described. Similarly the problem can be caused on a slope of many slopes of which this event occurs on the base of the stairs, this occurs when it really IS a staircase rather than just looking like one. Another cause of the problem could be that your collider has an offset relative to it's visible component (artist slang, I have no idea what to call it other than visible component or mesh-thingymajjig).
Seeing as three causes I just stated I am sure you would have an answer now.
1: Change step offset
2: Change plane inclination
3: Change collider location
4: Find another cause and rephrase or refactor your question.
Note that problem 1 and 2 share the same solution, and solution 1 and 2 are a solution to those. Assuming there are no other external factors included in the situation
Answer by gabrieloide · Aug 29, 2011 at 08:08 PM
Hello, what I did in order to solve this problem was to turn on the "convex" checkbox in the collider of my staircase, this way, it changes to a plane.
I was having the same issue and this solution resolved my problem perfectly. Thanks for the help!
Answer by Shahabaz · May 22, 2013 at 03:56 AM
For noobs, in case they run into this question while googling,
Create a cube in the scene.
Rescale and move it such that it sits nicely on top of the whole stair case, like a big long plane.
Disable the mesh renderer of the cube.
Run up and down the stairs with no worries!
Found another awesome fix! Much better than last one!
Select your First Person Controller
Under Character Controller in the inspector, change the Slope Limit to 90.
Run the stairs, with more realistic climbing action!
I thought setting the slope limit to 90 would allow me to run up walls, but it doesn't! It didn't occur to me to give ti a chance until I read this, and now I see it's the most success I've had in solving this problem yet. I think it also helps to change the speed slope multiplier to a horizontal line at 1.0.
Answer by teameden · Oct 30, 2011 at 06:06 AM
Since no one has actually answered the question, yes it is because the collision is too high for the Character Motor capsule collider, and is considered more 'infront' than 'over top' of the object in question.
One of my solutions would be to try ignoring collisions of y axis smaller than 'x' amount, where x is the general smallness of your stairs. I would also note that this will probably make your character step right over anything that is also similar in height.
Either way, I plan to design a new style collider after seeing this. Included tools only go so far, sooner or later, you gotta get dirty.
Best of luck
TE
Your answer
Follow this Question
Related Questions
Altering Character Motor max speeds from script 0 Answers
How to I make my player push off of the ground? 0 Answers
Character moving on x : hits non-perpendicular collider : starts sliding on z? 1 Answer
Moving platform option in new FPS controller 0 Answers
what are realistic values for the character controller 1 Answer