4.12 Spawn Actor Node not considering Scale

The Blueprint Spawn Actor node is not considering the spawn transform scale anymore, it has been working perfecly on previous versions of the engine, I recently ported my project to 4.12 to notice a whole set of actors incorrecly scaled to an absolutly absurd value (around 250).

I am now forced to rescale all actors after spawn all through the blueprints.

As of the moment I have no indication this happens in c++ as well as my c++ spawning code seems to be working correctly however I am not sure if I am rescaling them afterwars or not.

I am doing an Attach To Actor (new node, but the deprecated one also does the same thing) after the spawning but I don’t think it’s related to that, as using a set scale node after the spawn but before the attach seems to “solve” it.

Hopefully Epic can fix this on a hotfix so I don’t have to change dozens of blueprint spawn nodes with spawn + set scale combo.

Thank you

Hello,

Could you please provide a screenshot of your AttachToActor setup? The Spawn Actor node seems to be respecting scale by itself, so it could be related to AttachToActor. Are you ensuring to use the Keep World Scale option on the node?

Hi Sean, here I attach screenshots of my previous setup and the workaround I had to do.
This setup (working from 4.9 to 4.11 used to work, now it spawns my actor with a scale of around 200, some other actors (scaled 20) spawn with 600+ scale

This “solves” the problem, a scale node imediatly after the spawn node (Should not be needed as I’ve specified the scale on spawn)

Now this one…still uses the deprecated node, the node still works but same problem with scale (in this case…a scale around 600+ because the original scale is 20)

Finally here is my actor transform in world after spawn, It should be< 20, 20, 1> in this case…not 600. The very same blueprint is working on 4.11 without this issue. Thank you

93694-transform.png

Hi Again, I think I know what is going on, I made a sample project with the recreated problem (Sent to you by PM) my actor has a default scale of 25,25,1. The engine seems to be Multplying the default scale by the scale transform instead of enforcing it. Is this a new intended behavior in 4.12? were the previous version bugged and I had to use a transform scale workaround? honestly I can’t remember. Please try the sample project and let me know if this is intended or not, just click play, the actor will spawn with scale 500,500,1 instead of 20,20,0 (<25,25,1> * <20,20,0>)

The sample project has some of my work but it is fine, I used modified free Epic assets to make it anyway :stuck_out_tongue:
I’ll PM you the link. I’ll revoke the access once you’ve downloaded it.

Edit: Check your ue4 forums account for my PM.

Are you able to reproduce this same issue using one of the default meshes that come with the engine?

I have reproduced it with the mesh that you have provided, but when I used the Cube mesh that comes with the engine, I did not see the same results.

Try to create a blueprint out of the cube mesh, then parent it to some scene component (if not already) finally scale the mesh by 5. I haven’t tried it but I think it will work. (At least thats how I got my mesh doing that)

Edit: I was able to reproduce it with the cube using the intructions above. please let me know if you need a new sample project.

I guess the cube becomes the new scene component somewhat and then the spawning algortihm gives the actual scene component the scale of the spawn transform well…due to the parent relationship it gets multiplied. In my mesh it looks more like a glitch as the scale of the root component actually shows up multiplied in the editor. It didn’t happen with previous version of the engine though.

I was unable to get the same results using the base cube. Let me know if you are able to see the same issue using the cube, and if so, please provide the full repro steps that you used to get those results.

I’ve updated the link I’ve sent you, it now includes a secundary level called “untitled2” same issue with the default cube mesh. press Play, you may want to take the camera back a bit as the camera will be inside the cube due to it’s massive size. Just redownload the project from the same link.

Hey David,

I’ve reproduce your issue following your new steps, and have entered a bug report, UE-31838. Thank you for your report.

Have a great day

Hi David, apologies for the inconvenience but what you are seeing is the result of fixing a bug in the engine.

In 4.9 respecting the scale of the actor as set in the blueprint was implemented, however, a bug in AActor::FinishSpawning meant that it only worked if you were doing SpawnActor rather than SpawnActorDeferred (BP always uses SpawnActorDeferred/FinishSpawning while C++ can use either path, and more typically the non-deferred one is used) or that something modified the actor transform between SpawnActorDeferred and FinishSpawning was invoked.

This bug has been fixed in 4.12, however, it has the unfortunate side-effect of now applying the scale in cases where it previously wasn’t. We tried to come up with a way that would not change existing contents behavior, but unfortunately, maintaining a bugged behavior as backwards compatibility is often not possible, and arguably, not desirable as some people were intending that the behavior work.

Again, apologies for the inconvenience with seeing the changed behavior. I can assure you that we had to fix up a number of issues in Paragon as a result of this bug fix as well, so we well understand the impact.