How do i create realistic bullet holes with union in game

What do you want to achieve?
I Want To Create A Bullet Hole Using Negate,Union

What solutions have you tried so far?
I have tried a diffrent solution, im new to coding.
I also used a projectile instead of hitscan

Im not asking for a full script, give me an example on how i would implement it

I dont know how In Game/Runtime Union Works

First of all, you would need to get the position of where your projectile hit the object, then you would use that position to place a part in the correct spot on the wall.

From that point you would use SubtractAsync()

However,
I wouldn’t recommend using unions for bullet holes as it’s going to be really performance heavy and might cause a lot of lag especially with fast shooting weapons. A good alternative to that is to use decal bullet holes which cause a lot less lag compared to creating unions.

1 Like

I was trying to make a r6s cqb like game which on some walls can create the bullet holes,anyways after subtract async what do i do next?

If i may ask, does it also works with hitscan

I agree with this. Using Decals would be much more efficient for performance than to actually create Unions as bullet holes. Each union you create adds to the rendering time.

I haven’t used SubtractAsync much myself, so I recommend checking out the documentation.

And about your other question. Of course, it’s possible to use it with hitscan systems.

I ask you: do you know how I would do so that when I shoot and fall in position the decals are placed in the rotation of the surface that the bullet hits? if you need the script let me know