Hi. Is there a way to detect and controll if a rigidbody is beeing squeeze between a static collider and a kinematic rigidbody?
This is my setup: I got a nonkinematic rigidbody as player. It lives inside of a box of static colliders. Those are the absolute boundaries in which the player is allowed to move. Furthermore I got kinematic boxes moving with rigidbody.MovePosition. They are able to push the player arround which is intended. However if the player gets stuck between the moving box and the boundary, he will be pushed throug the static collider and leave the allowed area.
How can I detect if this is happening or how can I tell the player to be pushed through the moving box rather than the static collider? Is there an easy way to do this or do I have to force him by script (would be harder to handle than simply setting colliders)?
Thanks in advance.