I hope the wall destroy the bullet when the bullet hit the wall,when the speed of bullet isn’t too fast,anything is all right, But when the bullet move too fast,a error has occour,It will through the wall without destroy anything sometime.Is there any solution?or other way?
Thanks.
Are you using rigidbodies for the bullets? If so, try setting the collision detection for the bullets to be Continuous Dynamic, and set the walls’ collision detection to Continuous.
there is a trick on unity wiki using RayCast to make sure fast moving objects do not miss collisions, because what happens in your case that at frame 1 the bullet is before the object, at frame2 it is already after it, so there is no collision.