I’m working on a FPS game where I need to spawn decal on the wall behind an enemy I shot after the bullet went through the enemy, the problem is, when the decal get passed some worldstatic objects, it projects long stretched lines on them along the way it goes.
I wonder is there a way to make the decal “wrap” around the world objects, instead of “cutting” through them? and if it’s doable, what should I be looking at?
Any hints or tips? Many many thanks!!!
Another option, to make them ‘wrap’ around objects, can be a spherical projection, but then you need to specify the direction vector for each decal (can be e.g. from a bullet hit direction).
More info is available here:
Thank you so much, I tried it and it seems working, only the decal texture is showing black on the areas should be transparent. What setting should I be correcting?
Thanks, sorry I’m pretty new to material coding lol
Sorry I probably set it wrong, I’m just confused about where should I connect it to. I’ve captured a screen of the current graph for you, maybe it’s easy to just circle around on the image to point out where to connect things? Right now I just have them disconnected.
Notice how it only applies to the face I put it on.
The point is, the lerp is using that object orientation node to decide whether or not to show the decal. So we use the projection to turn the decal on/off.
Thanks, I think I’m getting there now, only it still have a bit of visible stretch but this time it’s in gray color… I attached a screenshot also the graph.
Maybe that has something to do with my texture? I have piled couple same decal materials at the same location after the weapon shooting. Maybe the gray area is showing is because of the alpha piled up?