- Home /
Unity collision detection sometimes misses a frame
I'm making a fighting game in which exact frame data is incredibly important, and while testing Unity's collision detection, sometimes a box collider doesn't register that it is colliding with another box collider for a random frame. To test it, I made the box collider that represents the attack hitbox only be enabled for a single frame, and the result of it was that occasionally the attack wouldn't get picked up by the opponent's box collider at all. This isn't the first or only issue I have with Unity's inconsistent collision detection. I'm wondering if there is a more consistent solution? If not, I'll just do the math and calculate all detection with my own programming rather than rely on something that doesn't consistently work. But, since that would require a decent amount of time and effort that I could be using to continue working on other things, I'd rather just use existing collision detection if it can work.
Are you using discrete or continuous collision detection?
Where would that setting be found? In the Rigidbody of the objects? I believe they all use full kinematic continuous collision.
Answer by mansoor090 · Oct 24, 2019 at 11:58 AM
For Collision or trigger , one of the object needs to have rigidbody component (usually its the character). to detect faster collisions use collision detection type to continuous (there are further two types in unity 2018) read them.
Your answer
![](https://koobas.hobune.stream/wayback/20220612213842im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Character is hitting the ground but not collisions are being detected. 2 Answers
Android collision issues 0 Answers
Inverted colliders? 1 Answer
Creating a "Connection" between two game objects using another game object. 0 Answers
2D Collision with tags not working,2D Collision using tags not working 0 Answers