Charachter Controller and collisions (Door) help
I'm a noob and I'm alpha testing my charachter controller and I am using a raycast to find a door which opens via Rotation on its pivot point. The door can be opened fine and from a small distance but I have a bug where standing directly in between the walls where the door shuts the colliders don't push each other and the charachter controller collider gets stuck in the door collider. I need a way for the door to push the charachter out when this happens. I tried OnCollisionStay but it doesn't seem to work any suggestions? It is as though they don't recognize that they are colliding. Also there are no rigidbodies on either object. Thanks in advance.
Answer by barmhartsam · Feb 25, 2017 at 02:50 PM
I want to leave my work around for others, attach an empty game object with box collider to the door. Set this to trigger. When you get stuck you can do 2 things use OnColliderStay to check for the player and open the door automatically and if this fail-safe fails (and it can) just set the key press to open the door as well inside OnColliderStay and then the door can be opened manually freeing you from its ghastly grasp.
Your answer
![](https://koobas.hobune.stream/wayback/20220612111924im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
CharacterController - Climbing system 0 Answers
Problem with DontGoThroughThings script 0 Answers
Help With NavMesh 0 Answers
OnTriggerEnter not being called 2 Answers
Compatible collision constraint methods 0 Answers