- Home /
Correct Way To Make Bullet Holes
The way I do bullet holes currently is
var clone = Instantiate(BulletTexture, location, Quaternion.FromToRotation(Vector3.forward, hit.point));
This creates another object on top of the hit.point, and it some what works! But if I shoot in the same spot a bunch it just stakes up and you can jump on to bullet holes that are just floating around.
Is there a way where I can place an image on the mesh i'm shooting at instead of creating an object on top of it!
Thanks!
there's is no real "correct way" , just two criteria one that it works the way you want it to , two that it works efficiently. most methods use a ray cast system or a collision of bullet system from experience.both systems depend on your style really. I like they ray cast system specifically for bullet holes.
Answer by whydoidoit · Mar 22, 2014 at 08:56 AM
Don't have a collider on the thing you are instantiating. You don't need one.
Alright it works! Quick question, is there a more efficient way than to clone the bullet holes endlessly? I know you can delete them but that's not exactly what I want! Thanks!
Well a pool would be more efficient and fade out old ones that are in areas of high density after a while and put them back in the pool queue. You could also use an overlay on the wall and write the holes into the texture though that can also be slow it stops holes hanging in space.
Your answer
![](https://koobas.hobune.stream/wayback/20220613140853im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Bullets holesnot instantiating in the correct position 0 Answers
Bullet holes in the wall (raycast) 1 Answer
Raycast hit.point is returning wrong 2 Answers
How do i destroy a particle when an object is destroyed 1 Answer
Change Texture of Clone 0 Answers