Generate hit events without stopping | Bullet penetration
Is it possible to generate hit events with a moving object, without blocking / stopping the actor?
I wan't to make a bullet penetration system, so that bullets can move through walls, if the bullet's penetration is high enough. The problem is, that when I enable hit events and set the response to "block", then of course the bullet will be stopped on hitting something.
Using "OnBeginOverlap" isn't possible here, because the bullet moves so fast that the actor location isn't at the hit location anymore (even when activating CCD).
How fast are your bullets?
This may not be enough, if you cover 1 meter in 1 frame, you might miss a headshot.
Have you considered using
Since you know the bullet velocity and distance, you can tell the time of hit, too. Once you have the data, you can calculate the possible penetration outcome and send the bullet flying to the last unpenetrable location.
This will not work great if the target is moving fast and the bullet is slow since you're checking for collisions here and now rather than over there and then.
If you're using physics for the bullets, there is an advanced projectile prediction node that does the time calculation automagically, it takes custom simulating frequency as input. Never used it for anything professional, though.
Follow this question
Once you sign in you will be able to subscribe for any updates here