I'm trying to use the CharacterController class for a simple runner game. And I found out that its collision is often wrong. Look at this screenshot, for example:
FYI, the red sphere is the point of collision reported by the OnControllerColliderHit() callback (drawn from OnDrawGizmos()). While you can see that capsule is the CharacterControl object in question. There are tons of other weird and wrong collision behaviours sometimes. Like not detecting a collision with another object when it should be, or colliding of an object althought its still far away, etc.
I didn't do anything out of the ordinary to the CharacterController's object. Just the usual calculate the final move vector of the object, time it by Time.deltaTime, use it as the parameter of CharacterController.Move()
Can anybody tell me what's wrong with this? And how to fix it?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
112 People are following this question.
Keeping characters within Fighting area
How to be tangent with the ground without a character controller?
Need help with Raycasting
Character Controller Slope