hello everyone, I’m a beginner and have a problem where the object can still penetrate the collision, maybe I can enlarge it, but it’s not effective, for example I make a bullet and shoot at the target, it’s probably normal if the bullet speed is low and the object will fall, and it doesn’t work if the bullet is very fast, the target doesn’t seem to touch the bullet and doesn’t fall, is there a way to strengthen the collision or any way to overcome this, I might still be able to search the internet, but I have to use a dictionary, please help thanks
Hi there Guserd, I had the same issue when I was first starting out, the reason this is happening is that the projectile is moving too fast for the collision to be detected, meaning that the detection is being checked usually 60 times per second (if you are running at 60fps) though as you can see with the video I have provided with my early tests with fast moving projectiles you can see that the bullet is skipping forward and not smoothly moving forward, what this was doing was when I was trying to shoot enemy’s with this projectile it would only sometimes detect the collision, though most times it would miss the collision all together as the bullet was never actually touching or inside the collider it skipped right past it, I never did get around to making a work-around for my early tests, though you can get more precise collision detection by going to both your Bullet/Projectile Prefab’s Rigidbody and changing the ‘Collision Detection’ to ‘Continuous’ (which keep in mind is more demanding on the PC than say discrete, but allows for more precise detections), also by doing the same on your enemy Rigidbody this can help with detecting if the projectile is either touching or inside the collider.
If this fails your only hope would be to make the Projectile speed slower, which in turn that would mean (if you have bullet drop that is) you would need to make the bullet be lighter (by lowering the ‘Mass’ on the Rigidbody) to compensate for the speed change, just so the bullet doesnt drop straigh to the floor upon firing.
https://www.youtube.com/watch?v=Lx9qW0pUzQI
I hope this has helped ![]()
