- Home /
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
,
Answer by Casiell · Aug 31, 2018 at 11:56 AM
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
Your answer
Follow this Question
Related Questions
how to stop rotation from being uncontrollable 1 Answer
how can i move a ball like in rolling sky game using mobile touch and reach the same physics ? 0 Answers
Mobile Character controller Moving in world space 1 Answer
character controller sinks into platform while using raycast to detect collision 0 Answers
How to change distance but maintain speed and height of jump 1 Answer