How to go about bullet penatration? (projectile *and* raycasting)

Im currently working on a custom casting system

The way it works is every wait() it will move the bullet directionally according to the origin direction and assigned velocity. - casting a ray everytime the bullet moves to see if it hit anything

im aware this isnt the most optimized way of doing things, but whatever.

It works most times, but its a little unreliable, can someone that has a good amount of time go into detail about how to go about bullet penatration? (preferably with some code examples, but if not its all good)

What about it is being unreliable? If you are raycasting the way I think you are (to prevent collision tunneling), it shouldn’t be unreliable. I have a similar system in one of my games and I’ve never had it go wrong.

1 Like

it only sometimes detects impacts, and rn after some edits that I can figure out the reversal of it is detecting hits besides where the physical bullet is

1 Like

update, ive fixed the reliability issue - but its generating the distance read parts (the part that is used to visualize the wall-bang read) multiple studs to any direction, no idea why - multiple times in random directions keep in mind