Why sometime an object can through another object?

Hello everyone. I have some problem about "Collision".

In theory, I throw out cubeA to hit cubeB. cubeA suold rebound! But sometime cubeA will through cubeB!(Most of them in too fast)

Why it happened? and have any way can effective solution to this problem?

Like you mentioned, this happens because the objects are colliding too fast.

The collisions are calculated once per physics step. What's happening here, is that the objects are moving so fast, that they are not colliding in one physics step, and have already passed collision in the next physics step, never actually have collided.

What you can do, if write a script to predict a collision between objects one step early using their velocities and their positions. This would cause them to bounce off each other a bit early, but it won't matter if they're traveling so fast.

In my projects I've seen this problem at low speeds as well. I've read that for reliable collision detection on moving objects you need to:

  • Use primitive colliders (no generated colliders)
  • Use a rigidbody

I'm not sure how accurate this is but thought I'd mention it since it's quick and easy.

You can also use the Collision Detection setting.

use Continuous for the object that is not moving too fast, and the continuous dynamic for the object that is moving really fast