Bouncing Bullet Glitch/Bug

  • Hi, when I launch the bouncing bullet in the game, it works fine but if I fire it at higher speeds, the bullet goes everywhere in random directions (it was really fast in the video but I can get it to do this at lower speeds). How do I fix this? Is it something to do with Vector3.Reflect breaking or something.

    Also, I checked the colliders on the bullets and they're fine.

  • Sorry for the delay.

    I've tried different settings, and while it somewhat works better when setting the collision detection on bullets to "Dynamic" or "Speculative" up to a speed of 40, there are still cases where they just slip through colliders. I investigated the exact time the collision happens and in those cases, the collision is called mostly when half of the obstacle has been passed already. So this means that the collision happens inside the obstacle, which is why the raytracing code for bounces cannot function reliably, resulting in the bullet either exploding immediately or bouncing in some unexpected direction.

    I am going to experiment with extending the raytracing length to better find the original collision position, depending on the bullet speed. As this needs some trial and error, it will take more time - if you happen to find any similar issues or solutions on the net, or fixed this yourself, let me know!

  • @Baroni Ok; thanks for the reply! If I find a solution, I will certainly let you know.

Log in to reply