- Home /
CharacterController collision - weird behaviour
I have a CharacterController (CC) in my game. The movement of this object is controlled through the CharacterMotor script. When the CC is moving on the ground, the OnControllerColliderHit() function reports that it is touching the ground. However, whenever the CC collides with an object in its path, the CC cannot move further in the direction but the OnControllerColliderHit() function does not provide the collided gameobject as the hit.gameObject but still keeps referring to the ground.
Any idea what I might be doing wrong? I have searched the forums but haven't been able to come across any similar issue.
did you check if the character controller has an adjustment for the maximum step of height of things it can walk over? I know that the 1st person character controller has adjustments in the options for maximum step height, maximum slope , etc
I don't want it to step over things. I want it to recognize the object in front i.e. give me the correct gameobject it collided with when moving forward.