Spawning Decal Rotation

I am wondering if I am able to spawn a decal and be able to rotate so it spawns flat on any surface instead of being rotated sideways where ever it hits. So hits a wall = vertical, hits the ground = horizontal. Its a projectile with event hit.

Hi

This is how you would add Relative location straight after spawn, just example.

What I would do, is promote to Variable, after hit run a line and add relative location.

Might look like this

43398-capture.jpg

43399-capture.jpg

You could also think of this as the UT Bio-Rifle which spawns a decal exactly the way i want to spawn it.

I didn’t get those delta rotation inputs on mine.

Hey I haven’t heard from you in a while. I would still like to know some more info.

Hi Gunnar0.

I was looking to do the same thing and found this:

It was exactly what I was looking for. Here is the [full article][2]. Hope this helps!

I’m responding kind of late, hadn’t been putting much work into the decal rotation. But this was definitely the answer to my question.

Thank you!

I’m responding even later but I think that while this is very close to being right, it is wrong in the sense that the behavior is placed in the wrong hands. In the above, the projectile OnHit event is given the side effect of spawning the bullet hole decal (and destroying itself). This is wrong for several reasons:

  1. Only the actor taking the hit knows what kind of decal to spawn. Different actors/materials would look differently when struck.
  2. Its likely that you would want the spawned decal to stick (weld?) to the actor that received the hit so if there was subsequent movement it would keep its relative position. Think of a moving target or human falling to ground.

i.e. I think the behavior should be on the OnHit event of the other actor in the collision.

Oh definitely, but i haven’t really focused on those two things when I have worked. I’ve known about them just didn’t get around to them

So you’re saying to make every wall and floor an actor? Would that eat into memory? I’d assume it’s more costly to make everything a BP actor than if they were just static meshes.

This would not be practical, I think the best option for the decal material would be to use something that is already returned by hit result: Phys Mat. That gives you the exact type of material that was hit.