Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Stairs & Unity 5

edited April 2015 in Technical Q&A
Hey all - 
Is anyone else having issues with the player having a harder time negotiating stairs in Unity 5?  I got it to work pretty well with AC and Unity 4, but once I upgraded, my player is having a hell of a time ascending anything.  I'm currently looking at making most stairs have an invisible ramp collision volume, but that's not ideal...but I don't really want to have to reconstruct every staircase in my I thought I'd ask and see if anyone has come across this and had an easier solution.  I know there were a number of physics changes in Unity 5, so I'm guessing that's the culprit?


  • I'd be keen to know of anyone's thoughts, too.  Are you relying on root motion, @themightyzq?
  • I'm having the same problem too and, like in your case, it also started when I upgraded to Unity 5. I'm using slopes now but the player finds it hard to climb even them, and more so at low framerates.

  • I've seen this too in Unity 5, though on a project I wasn't using AC for, and I managed to solve it by raising the step offset in the Character Controller. I'm not sure what that does or how that relates back to something that can be set in AC, but that definitely helped my player scale higher steps without getting stuck or bouncing around.
  • AC does support the use of the Character Controller, but personally I haven't had to resort to it.  Does the problem persist if you don't rely on root motion, @themightyzg?
  • Yeah, the problem is still there if I have "Rely on Root Motion" checked or unchecked.
  • All right.  Try it with the Demo game's Tin Pot player prefab.  If it doesn't work then (with or without any minor adjustments you may need), then at least we'll both have a shared character we can work with.
  • Okay - just tried it with Tin Pot and I'm having the same issues.  
  • Did you make any alterations to him?  My own tests with that specific character work fine, so it may be a setting in your scene somewhere.  All I'm doing is setting the 3D Demo's Movement method to "Direct", and making a new scene with a couple of Planes as floors - one a slope.  You can move up the slope and fall off it.
  • No alterations.  Just changed out my player for Tin Pot.  In terms of settings, I'm using a version of your Walking Dead template with some tweaks.  Camera 3D, Direct input, etc...Now, I generally don't have too big of a an issue with going up ramps.  It's stairs or it's any "sudden" difference in floor height.  So, obviously staircases are pretty much a no go, if they aren't using a ramp collision volume...but if I even have a section of terrain and I put something like a small chunk of rock in said terrain so the player can walk over it, the player will easily get hung up on it even if there's just a slight height difference from the rock to the terrain.

    If you build a scene with a few different planes at varying heights without a ramp (like building a small ledge that you'd essentially have to step up on), is Tin Pot able to traverse them without problems? 

  • I find that it largely depends on the relative difference in size between the height, and the radius of the character's Capsule Collider.  However, you might have better luck using a Character Controller instead - though I don't know if that will conflict with using root motion as well.
  • Okay - I'll try adding a Character Controller and see what sort of madness I get into before I convert all stairs over to ramps.  Thanks, Chris.
  • Heya @ChrisIceBox

    So, I have created a new player prefab where I've removed the capsule collider and rigidbody and replaced them with a Character Controller.  Seems to be working (although movement is a little different and I'm getting used to it) thing that I did come across is that hotspot interaction seems to have broken.  I'm using your Walking Dead template, so I'm guessing that the Detect Hotspots script is probably looking for the rigidbody info or something?
  • edited May 2015
    Ah.  Yes, it is.  However, you should be able to get around that by adding a Rigidbody to the Hotspot Detector object itself (and disabling gravity checks).  The Hotspot Detector makes use of Unity's Trigger code, and a Rigidbody is a prerequisite.  Good spot.
  • Okay - that worked, thanks Chris!

    Now it's going to be all about trying to make the Character Controller feel as fluid as the old setup.  Lots of little things about it feel "clunkier" than the rigidbody/capsule combo...maybe it's just because I've been using the other setup for so long now. 
  • I had a similar issue - I was able to resolve it by using a quad slope over the stairs, but increased the friction on its physics material and that seemed to work.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.
Do NOT follow this link or you will be banned from the site!