- Home /
Small 2D collider passing through other thin collider
I have a 2D collider that's pretty small(a bullet), moving at pretty high speeds. It often passes through other, static colliders (walls). I've tried making the bullet's collision detection continuous, but it didn't seem to really help. Any fixes for this?
EDIT: I forgot to mention, the bullet is used as a trigger.
Answer by Dodokom · Oct 07, 2019 at 06:18 PM
In the end I solved my issue by making the bullet not be a trigger and using OnCollisionEnter2D() instead of OnTriggerEnter2D(). :/ This way continuous collision detection actually works.
Answer by tormentoarmagedoom · Oct 06, 2019 at 06:51 PM
Hello there.
You should use collision detection Continious_Dynamic fo better results.
Another thing you can do is to reduce the Fixed time, so will be more fixedupdate frames per second
https://docs.unity3d.com/ScriptReference/Time-fixedTime.html
good luck!
Is there a way of enabling Continious_Dynamic on 2D that I'm not aware of? In 3D I have the option but I can't get it to work in 2D.
Oh, i really dont know, never done a 2D project. REad the manual of Rigidbody and Collisions to have more info.
Increasing the rate of FixedUpdate should also make better collision, maybe is enought.