# Spawning Decal Rotation

**URL:** <https://forums.unrealengine.com/t/spawning-decal-rotation/316770>\
**Category:** Blueprint\
**Tags:** projectile-hit, spawning, unreal-engine, Blueprint, question\
**Created:** [April 28, 2015, 9:44pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770 "2015-04-28T21:44:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gunnar0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunnar0](https://forums.unrealengine.com/u/Gunnar0)\
**Post date:** [April 28, 2015, 9:44pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/1 "2015-04-28T21:44:09Z")

</div>

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.

 ![40634-untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/1/7b1d01f782a13cce7e0e25a242e2383427d51415.jpeg)

---

<div class="post-metadata">

**Author:** ![Gunnar0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunnar0](https://forums.unrealengine.com/u/Gunnar0)\
**Post date:** [May 20, 2015, 2:39am UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/2 "2015-05-20T02:39:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [May 20, 2015, 2:46am UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/3 "2015-05-20T02:46:56Z")

</div>

Hi

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

 ![43397-capture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/8/1187039c1f8d063844452d92391007c0febf36bd.jpeg)

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

Might look like this

![43398-capture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/c/06ce58d8e6a509d05b9b34efc1f1a1d03dd47b0b.jpeg)

![43399-capture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/2/372a713df3640690f495d7f6cc37cfdad7a48b44.jpeg)

---

<div class="post-metadata">

**Author:** ![Gunnar0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunnar0](https://forums.unrealengine.com/u/Gunnar0)\
**Post date:** [May 20, 2015, 12:11pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/4 "2015-05-20T12:11:14Z")

</div>

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

 ![43434-untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/5/975a6f538a988136e0294d77136fea4fac5dff6a.jpeg)

---

<div class="post-metadata">

**Author:** ![Gunnar0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunnar0](https://forums.unrealengine.com/u/Gunnar0)\
**Post date:** [June 1, 2015, 12:11am UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/5 "2015-06-01T00:11:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ScrapingBottom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ScrapingBottom](https://forums.unrealengine.com/u/ScrapingBottom)\
**Post date:** [November 24, 2015, 12:40pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/6 "2015-11-24T12:40:08Z")

</div>

Hi Gunnar0.

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

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/7/87d2ec1599da0a3d575281a87e2a1af87cbd8720.jpeg)

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

---

<div class="post-metadata">

**Author:** ![Gunnar0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunnar0](https://forums.unrealengine.com/u/Gunnar0)\
**Post date:** [February 4, 2016, 10:43pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/7 "2016-02-04T22:43:29Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Greg\_G\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Greg\_G\_1](https://forums.unrealengine.com/u/Greg_G_1)\
**Post date:** [August 8, 2016, 3:08pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/8 "2016-08-08T15:08:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gunnar0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gunnar0](https://forums.unrealengine.com/u/Gunnar0)\
**Post date:** [August 8, 2016, 3:13pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/9 "2016-08-08T15:13:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![0vr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@0vr](https://forums.unrealengine.com/u/0vr)\
**Post date:** [January 21, 2018, 6:56pm UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/10 "2018-01-21T18:56:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![theRPGmaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/therpgmaster/32/1139086_2.png) [@theRPGmaster](https://forums.unrealengine.com/u/theRPGmaster)\
**Post date:** [October 23, 2018, 7:22am UTC](https://forums.unrealengine.com/t/spawning-decal-rotation/316770/11 "2018-10-23T07:22:35Z")

</div>

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.
