Step Offset issue

It used to be work in U5.2 but after the update to U5.3 I keep getting the error whenever I connect the Character controller onto the player
What changed to cause the error, and how can I correct it?

I’ve also tried changing the variables and having it on the different parts of the player.

Step Offset must be less or equal to + * 2

Step Offset must be less or equal to scaled Height + scaled Radius * 2

Step Offset must be less or equal to <scaled Height> + <scaled Radius> * 2

(hard to search for this when Answers formats out anything within less than and greater than symbols. If you use the “code sample” format you can get around it.)

You need to make sure that the combined numbers for “Radius” and “Height” under any Character Controllers are less than what number you have for “Step Offset”. If your character is scaled, make sure to multiply that appropriately.

Must Be:
(CC Radiusplayer scale) + (CC Heightplayer scale) <= CC Step Offset

I’m not sure about all the ins and outs of why this was changed… There is no way around it if you want to use the UnityEngine library and thus “.move” that I know of. I think it should be labeled as a “bug” and fixed because I need my character controller’s height and radius as well as the step offset at precise numbers. That’s how you solve your issue. I’m still looking for a way to solve mine :stuck_out_tongue: I’ve gotten rid of my character controller and am sadly building my own “move” that has to do all the flag checks and what not. Not fun to waste time on this when it worked just fine before.

For me the answer was quite simple. Use the Model Scale Factor on the fbx, rather than scaling the gameObject

Hi guys,

I had the same problem and I think I found a solution so that I can keep using the CharacterController.
So the problem occured when I was scaling down an object that had a CharacterController attatched. What I did to solve this, was I scaled the CharacterController up in advance by the factor that I use to scale down my object. You also have to calculate an offset by which the CharacterController is moved upwards and add it to the center value of y (offset).

controller = selectedCharacter.AddComponent<CharacterController>();
controller.height = 1.6f / scaleFactor;
controller.radius = 0.5f / scaleFactor;
controller.center = new Vector3(0, 0.85f / scaleFactor + offsetValue, 0);
// scale character after the CharacterController was scaled
if (scaleFactor != 1.0f) selectedCharacter.transform.localScale = new Vector3(scaleFactor, scaleFactor, scaleFactor);

I Find the Answer
Step Offset must be less or equal to + * 2

  1. Select CharacterController in hierarchy
  2. CharacterController find (Step Offset) on Inspector
  3. Step Offset value change to less than 0.3 //>0.3