I’m new to Unity and game programming in general so please forgive me if this is a simple problem. I’ve got a simple script that destroys a bullet and spawns and explosion when the bullet collides with an object, usually the ground. This works fine on flat ground, but any hills cause the bullet to pass through without getting trigger event. Here is a video that shows the problem
Is the bullet using a mesh collider?
If so, try inflating it or using a box collider instead.
The bullet is using a capsule collider, it was set to Radius 1 and Height 2. Setting these to 10 and 20 solved the problem, thank you. Can you explain why the size is causing the enter not to be called? Is it because the bullet passes through between updates? Thanks.
It could be because it passed through in between frames, yes. That would be one working theory to test out.
You can actually single-step Unity with the rightmost >| button at the top and watch closely (zoom in on the scene view right to the collider of the bullet) to see if it does move “enough” per frame that the smaller collider goes through.
You cam also modify the rigidbody on the bullet to change its CollisionDetection value to be continuous or continuous Dynamic. Read the docs for the implications this has on physics performance.