High speed Object Collisionhow to avoid pass through collider object?

I give rigidbody to the object, and use rigidbody.AddForce to make the object moved. Some times, the speed will be very high, and the object may pass through some other collider objects. How can I avoid this?? Thank you for help??

also: rigidbody.interpolation = RigidbodyInterpolation.Interpolate;

From the official Unity Script Reference (with a few spelling corrections):

"Use the Rigidbody.collisionDetectionMode property to set up a Rigidbody for continuous collision detection, which is used to prevent fast moving objects from passing through other objects without detecting collisions. For best results, set this value to CollisionDetectionMode.ContinuousDynamic for fast moving objects, and for other objects which these need to collide with, set it to CollisionDetectionMode.Continuous. This has a big impact on physics performance, so just leave it set to the default value of CollisionDetectionMode.Discrete, if you don't have any issues with collisions of fast objects. Continuous Collision Detection is only supported for Rigidbodies with Sphere-, Capsule- or BoxColliders."

http://unity3d.com/support/documentation/ScriptReference/Rigidbody-collisionDetectionMode.html

See the DontGoThroughThings script on the community wiki.

Change the rigidbody collision detection from “discrete” to “Continuous Dynamic”. hope it helped :slight_smile:

You have 2 ways:

1: Speed up the physics time in the physics menu (see the documentation)

2: You can make a raycast to your moving object and stop the motion by script.

Bonus hint: Add a rigidbody component to the stoped object and mark it as "IsKinect". The colision between two rigidbody is very more realistic.

Good Look

Make the collider of the object that is moving at high speed slightly larger than it is already until you find it doesn't pass through anymore.

Or if you have a rigidbody just increase the drag or angular drag! seems to work on what i did

This is an old question, but it’s worth mentioning:
If you’re trying to set your kinematic rigidbody’s position using the transform node such as:

myObject.transform.position = thisNewPosition;
or
myObject.transform.Translate(deltaPosition);

those won’t obey the collider.

Instead, set the rigidbody’s velocity with:

myObject.rigidBody.velocity = (thisNewPosition - thisOldPosition)/ Time.deltaTime;

Hope that helps!

So nobody has solved this yet?? I have the same issue trying to hit a ball with a paddle… the ball goes through the paddle at certain speed.