Decal not projecting on anything else other than ground

I created a decal component in my game. This component lies in the TacticalLaser Attachment BP.
I’m running a line trace on a timer and just updating the world location of the decal where the trace ends. It’s projecting just fine on ground and a few spots (which are also perpendicular to the ground) but not on the actual stuff like doors buildings etc.
The line trace is fine, I tested it. The decal is being projected that’s for sure but at certain angles on certain objects it’s not proper.
How can I fix this ?? Please help


BP Setup

Projection on Ground works fine


Anywhere else it’s invisible


Except for a few strange angles like this, where it’s fine


Even on some objects its visible

You need to get the orientation right, too.

Can you show the start of the code also?

The node has nothing. Its a custom event that uses a bool to toggle the timer and the timer has another event that fires the line trace and toggles the visibility of laser static mesh + setting the location of the decal component. It’s really simple that’s why I omitted it. It has something to do with the decal but I’m not sure what it is.
If you still need it then I’ll upload a screenshot here

I mean it would be nice to see how you’re constructing the trace, just in case…

image

( how you make the start and end ).


There you go. I’m using the laser static mesh as the centre and using it’s FV for trace. Line trace hits it perfectly on all surfaces. Somehow the decal messes up

Cool.

So you need to adjust the rotation of the decal to match the surface it’s appearing on.

If you spawn them, you can do that like this

So it’s probably very similar for your case

decal

Yes, in fact

decal on tick

1 Like

Thanks mate. I did that but for some reason it was still the same. I thought maybe I reduced the size too much so I kept the default rendering size for decal but scaled it from the details panel. And I found some weird issues.
Watch this. It disappears randomly. It is being projected but somehow it decided to be invisible at certain parts of the world objects

My immediately reactions are one of two things

  1. There’s something up with your set visibility code, can you show what you have now?

  2. The meshes have no ( or the wrong setting ) collision. But it doesn’t seem to be consistent…

:thinking:

Can you show that gate from your vid in player collision mode?

I used the node “Set world location and rotation” like you used and reset the size and then manipulated the overall scale. Restarted the editor and now it’s projecting on more assets and certain angles. So i’m pretty sure it’s a normal issue due to collision. Will try some fixes and will let you know. Thank you for your help so far :slight_smile: !!

1 Like

Hey it’s fixed now. Someone suggested me to try “Trace Complex set to true” on my line trace by channel node and that fixed it !!

Keeping it here for anyone who needs it in the future.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.