Physic Tunneling on high speed bullets

Hi!!

Is there a way to avoid high speed objects ( bulet ) pass by a wall ?

OBS - on Box2D i can use isBullet to avoid Tunneling.

Thanks!!

got to wiki and there it’s a script for fast moving a
object to avoid passing …

Don’t know right where but in the wiki under scripts I think …

the easiest way is to introduce raycast bullets which is what is commonly done for fast moving bullets (MG and alike). you shoot visual bullets but the actual calculation for hit detection etc is pure raycast.

the real alternative if you want physical projectiles is likely a hybrid: record the position and at the next update, do a raycast from the recorded (-> previous) position to the current one.

if it hits, you know the projectile has hit something and react to it (you get the same data as on collision if not even more)
if it has not hit, update the “old position”