[Support] UDecalComponent not moving with actor.

I have a class “PostalPackage” that inherits from AActor that constructs a UPackageLabel which inherits from USceneComponent. Inside my UpackageLabel it creates a UDecalComponent and I attach it to the UPackageLabel component. So when I use my UPackageLabel component on my APostalPackage it should display the decal on the actor. It does display the decal and the component is attached to my APostalPackage, but it doesn’t move.

Here’s the problem. My APostalPackage actor moves, but not my Upackagelabel. It only moves when I eject out of the player and click the package then I repossess the player and pick it up.

Package Label Constructor Code: PackageLabelComponent - Pastebin.com
Package Constructor code: PackageActor - Pastebin.com

Here is a gif of the decal in the background. You can see the green decal just static, but the package is able to move around freely.

When I click on the package in the editor and try to pick it up it will now move with the package.

Thanks a bunch if you can provide any assistance to this issue. :slight_smile:

I think the Engine rejects the idea of nesting one scene component in another. The typical way I do it (and that I’ve seen it done) is to construct components in the owning actor and then set up attachments. If you want your UPackageLabel’s DecalComponent to be nested anyway, I think you will need to register the DecalComponent with the owning actor and then setup the attachment.

Untested pseudo code:



// void OnComponentRegistered() [UPackageLabel should have a virtual function similar to this];
// {
//    GetOwner()->Register(Decal);
//    Decal->SetupAttachment(this);
// }