Not much code to be posted here, because I don't think that's the issue. But I have found out, through painfully long testing, that a character using Unity's built-in Character Controller component doesn't fit through spaces lower than its height + step offset. This is really annoying, especially when trying to go through doors.I don't have any other colliders attached to the player object that could interfere with the collision detection.Is there any sort of workaround here? I would like to have a reasonable step height and not a dwarf as the player.
you could make the doors taller
That would indeed solve it, but there must (or should) be a way of solving this differently, since the apparent height of the controller seems to fit through it perfectly.
you need to add the controllers skin width twice to get the total height of the controller.
That's indeed an interesting point, but it sums up to about 0.02, which is negligible in this case.But thanks anyways
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
5 People are following this question.
Can we limit game object within specific Collider/Colliders?
Movement with collision detection but without a CharacterController
How to move a Collider in a Game Object in a Direction
How to reliably break contact/collision?
Raycast exit point of collider