While making a game I am stuck at following situation :
When I use a object A to hit another object B at a certain speed or higher than that, object B always overlap above object A. I have applied mesh collider to both the objects. Well, I will like both the objects to collide rather overlap each other. Anyone knows where I am going wrong ?
Sounds like object B is moving faster then the psychics engine can track it, as a result the collision isn’t detected till object B is overlapping object A. (or at even higher speeds object B will simply pass object A without collision)
You can try to lower the time between psychic steps but thats usually a bad idea.
(Edit → Project Settings → Time → Fixed Timestep)
A better solution would be to avoid using colliders with fast moving objects, a good alternative is to use a ray-cast to find collisions for those object.
I have recently come across this. When running your project in unity, set the rigidbody’s Collision Detection Mode to CollisionDetectionMode.ContinuousDynamic. For some reason I’ve had this problem for a while and only setting it at run-time (post-instantiation) solves the problem. Doing it on Start or Awake does set the value but the ridigbody doesn’t act properlly until I set it to something else and then, back again during run-time.