- Home /
How i can repair my shoot decals?
Hi, i use a system of decals to shooting. When i shoot at the corners is it:
and i want this:
I hope you're gonna port the music over too, in glorious $$anonymous$$IDI-quality
Hey now, $$anonymous$$IDI isn't audio. Every modern composer uses $$anonymous$$IDI! It's all about the synth. But still, I've heard a lot of renditions of the themes, and none of them hold a candle to the original blippy bloops.
Answer by Arnout Swint · Mar 21, 2011 at 12:13 PM
Awnser:
don't shoot to close at the corners haha
no just kidding...
what you could do (some sort of workaround) is create an non-collidable invisible wall right next to the corner that will overlap the decal.
just a thought :)
@Arnout, nice but inaccurate workaround =) Will also cost you extra memory to save an extra collision model for your whole world.
Answer by Marnix · Apr 07, 2011 at 10:13 PM
Multiple solutions are possible for this problem. Currently, you are creating decals of a standard size, which gives problems of course.
Solution 1
Update the actual texture, don't use decals. Write your decal to the texture instead.
Solution 2
Perform multitexturing on every object that is shootable. Create a new texture with your decals in it, wrap it onto the building.
This solution is a memory eater, it creates textures for every object
Solution 3
Do a check of your decal when adding it to the wall. You could think of shooting rays from the back of the decal again. Or do a box intersect. The intersection points will let you clip your decal texture.
Yes this is a hard one, but gives you more freedom in your decals
The cheapest solution is texture manipulation. (But I think you will need a renderTexture for that?) It will result in the same amount of draw calls, where your decals create 2 extra triangles per decal (100000 bullets ouch).
Update
I found this little project on the forum: http://forum.unity3d.com/threads/2562-blood-splatter
Your answer
Follow this Question
Related Questions
2D Bullet texture follow ray and Bullet Holes 1 Answer
Decals on corners 1 Answer
Adding bullet holes to walls 3 Answers
Raycast Positioning 2 Answers