Reputation: 196
Working on a platformer game.
For example, collision without logic will overlap each other when you give velocity to one of them (I solve it with triggers that prevent movement to side where other collider is near).
Now I face an unsolvable trouble. Sometimes my character gets stuck in walls
or cant fall because unseen collision happens.
1 - box collider
4 - box collider
2,3 - triggers
Searching haven't give me structured and right answer, so please, help me solve it.
P.S. Character controller script - https://github.com/rincew1nd/Sleepy-mole/blob/master/Assets/Scripts/character_controller.cs
P.S.S. When I turn off "fixed angle" on character rigidbody2d, all works fine, but physics change a lot and I wanna rigidbody2d with "fixed angle".
Upvotes: 1
Views: 621
Reputation: 196
I have find an temporary solution for this issue, but it like "invent a wheel", so i still need better solution. Turn on/off fixed angle of rigidbody2d if position not changed for a while and character is not grounded. http://pastebin.com/Qsm4HACj
Upvotes: 1