check every frame if collider entered the another collider or not
I have a ball and the wall. Ball is supposed to stop when it entered the wall's collider. I tried ontriggerenter , it worked but ball is entering the wall a little because of ball is too fast. I searched and i learned ontrigger didn't check every frame so i have this problem. I need to check every frame did it enter or not.
Answer by xxmariofer · Jul 09, 2019 at 08:39 AM
physics are frame independent, it doesnt matter if you check every frame, since hte collisions dont get updated every frame you wont get any advantages of checking the collision every frame. for increasing the amount of ticks of the collisions comprobations you can change the rigidbody to continues dynamis, also most likely the object is not that fast but you are teleporting the object (moving it with the transform component) and using the rigidbody component for moving the object should fix it, if nothing of this works you can try changing the editor->project settings->time and change the fixeddeltatime, since is the amount of comprobations that are done peer frame, (but obviously increasing the number of comprobations will have performance issues and your fps might drop)
Your answer
![](https://koobas.hobune.stream/wayback/20220612204549im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I differentiate between the triggers? 1 Answer
OnTriggerEnter no longer works 1 Answer
Calling "OnTriggerEnter" when a parent object has a rigidbody 0 Answers
OnTrigerEnter not working 2 Answers
Trigger not detected 0 Answers