The game object penetrates the collision body when moving too fast

I want to move hero by touch. But when i touch and move quickly, the collider can not block the hero. There are two videos which I recorded. Who has a good idea to avoid this problem?

My Issue Video

https://github.com/yuruxuan/UnityIssue/raw/master/CurrentStatus.MP4

I want

https://github.com/yuruxuan/UnityIssue/raw/master/MyTarget.MP4

,

Make sure you are moving your object by Rigidbody.MovePosition. Moving object by Transform.Position bypasses physics checks so if you move to fast it goes through colliders.

Also try changing collisionDetectionMode on your rigidbody to ContinuousDynamic so collisions update more often