- Home /
How to create stairs?
Hello,
Im trying to create stairs by using a stair object. Unity made the collisions for me.
I can walk up the stairs but Im stucking very often. Is it possible to tell unity that the object contains stairs? Or handle the stairs just as a diagonal?
Thank you very much
Answer by e-bonneville · Mar 27, 2010 at 12:09 AM
If you are using the FPS controller, you could increase the Step Offset. If that doesn't work for you, create a empty game object. Then, add a box collider and scale it to meet the dimensions of your stairs. Then, rotate it correctly. That should do the trick! Good luck - Elliot Bonneville
Yep, adding a box collider is a good idea, but adding a rigidbody is not. It's static geometry, so there's no reason to add the overhead of a rigidbody.
Well, the way I was thinking is that, using the settings on the rigidbody, one could set it to kinematic... I guess that's only for meshes? Need some coffee... lol
It's not only for meshes, but there's no need for it at all when it's just static geometry. If you were making it into a retracting staircase or escalator or something else that moves, then yes.
The Step Offset was no success.
But the Box collider was perfect! I've just made a ramp with the box =)
Thank you very much
Answer by David Cavitt · Jun 11, 2011 at 11:03 PM
how do you get your character to walk on a collider? i'm using a 3rd person controller/character and when I try to get him to walk up a collider at an angle, he just hits the collider and stops. Is there a setting on the collider that I need to change? THanks.,How were you able to get your character to walk on a collider? I'm using a 3rd person character/controller and whenever I try to put a collider down at an angle, my character just hits the box and isn't able to walk up it? Is there a setting I need to change on the collider to allow my character to walk on it? Thanks
please dont hijack threads and post questions as answers =(
Answer by 3dgreg · Jul 24, 2015 at 10:04 PM
I just did the same thing. I created the stairs in Maya, exported them as an FBX file. In Unity (5), I created a plane and buried it just underneath the stair treads so you can't see it. Player walks up and down with ease.
So you just added a box collider to an object under the stairs and it worked?