Spawning Decals with Blueprints

Hello everyone,

I’m trying to use decals to create an expanding ring of light around a character for a pet project. When I make a decal and set it up in the level, it looks fine (but is static, doesn’t expand). When I spawn a decal using blueprints I can make it expand, but for whatever reason it doesn’t seem to be orientated correctly. I have tried rotating each axis +90 degrees and -90 degrees individually on the Spawn Decal node, and tried adjusting the size of the decal to 1000+ units (it is being spawned 91 units off the ground). Any help would be fantastic.

When you use Get Actor Location, it gives the location of the players origin, which is most likely the center of the collison mesh for the player, and that is probably 91 units above the ground. You could try splitting the location into X Y Z coordinates, and then subtracting 91 from the Z value. That should place the decal at the players feet.

Hi there, I tried what you suggested, but it doesn’t seem to have made any difference. Thank you though. Any other ideas? I’m still scratching my head over this.

First, do you realize that you spawn a new decal each frame the timeline runs?
If this is not what you want, you should spawn the decal once (before starting the timeline) and remember the spawned decal object in a variable, and then resize it each time through the “Update” execution.

Second, I don’t see you actually rotating the decal on spawn. Generally, to align a decal with the “ground” (when using default level editor conventions) you’ll want the “Y” part to have the value -90 in the “rotation” field of the “spawn decal” action.

Third: You dont’ necesarily want to always subtract 91 of Z from the location of the player, because you may change the player height (crouching?) or you may be above/below ground (standing in water? Jumping?)
Instead, you want to trace a line from the player position, straight down, and use the “impact position” of this trace as the location you spawn the decal.

If I had to debug this further, I would first remove the timeline, and just spawn a decal, and adjust the location and rotation so it spawns correctly. (Another way of getting a rotator rather than hard-coding it is to use something like Make Rot from Z)
Once that all shows up correctly, I would add the timeline back, and I would only resize the decal that was first spawned in each Update, rather than spawning a new decal.

And, if I had to create the effect you’re talking about, I’d probably use a Cascade/particle system rather than a decal :slight_smile: