I have a 5x5 grids, with 5x5 walls. When I shoot a projectile in the corner in a certain angles, it always penetrates between the colliders. I tried changing to 5x5 grids with 6X6 walls, but no luck: The projectiles are 0.4x0.4x0.4 in dimension.
Yeah, they are continuous dynamic. They are also penetrating with just continuous. I also tried disabling interpolation, in case it somehow could be interpolated inside the corner, but also no luck. The projectile is a cube collider.
It seems that it is a issue with the box corners. I am accelerating that projectile with AddForce(transform.forward * 500); Any ideas someone?
I managed to reduce the collision discrepancy by changing the fixedUpdate to 0.01. But the projectiles are still not colliding with a part of the box corner. Is it supposed to happen even with a continuous dynamic collision detection? The projectiles can still penetrate through building meshes, which is an undesired behavior.
The only solution I can think of is using a physics raycast every time you fire to see if the projectile will collide with the wall. However, a raycast is just a straight line, so it would require some calculations to account for the projectile drop due to gravity.
It would probably be better to use Physics.SphereCast. But it really shouldn't be necessary! Continuous collisions ought to solve the problem.