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*
Answer by jeromeWork · Mar 18, 2017 at 10:21 PM
For me the answer was quite simple. Use the Model Scale Factor on the fbx, rather than scaling the gameObject
Answer by HalversonS · Apr 07, 2016 at 01:23 PM
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 Radius*player scale) + (CC Height*player scale)
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 :P 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.
Answer by degude · May 20, 2016 at 12:55 PM
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);
Answer by Maynk · Aug 19, 2020 at 08:28 AM
I Find the Answer Step Offset must be less or equal to + * 2
Select CharacterController in hierarchy
CharacterController find (Step Offset) on Inspector
Step Offset value change to less than 0.3 //>0.3
Your answer
Follow this Question
Related Questions
Should I even bother to upgrade from 4.6 to 5.2? 3 Answers
Accurate LookAt with offset 0 Answers
Set transform.position relative to rotation 1 Answer