How to change mobility setting for new static mesh components?

Because when they are “static”, lightmass is able to generate static lighting for it. Otherwise I have to live with dynamic shadows and the results observed.
The wall on the right in the last screenshot is made of static meshes (manually assembled) and looks best.:slight_smile:

waaaiiiit aaa minite here… Maybe Im just spawning the thing wrong :eek: Could be. :rolleyes:
So here is my little floor creation routine. I simplified the graph a bit:

This is the construction script of the blueprint:
The Base is created directly, then the CreateFloor function loops as required, then the CreateRoof function adds the roof.

The CreateFloor and Create Roof functions look like this:


They both call the PlaceComponent function which finally creates and places the component:

So I guess this the function that needs to be corected.
How does a proper spawning sequence looks like :confused:

Thanks for all help :smiley:

**
Update: :)**

I just feel so stupid. So very stupid. Like I can feel my brain melting in stupidity and oozing out my nose. Please whack me with a frying pan… :o

I was hunting down some further info on this as : https://answers.unrealengine.com/questions/4742/is-there-a-way-of-changing-an-actors-mobility-in-b.html
which was a bit discouraging at first, but then thisone solved it:

https://answers.unrealengine.com/questions/22313/bug-no-static-lighting-for-constructionscript-gene.html#answer-22973

I basically had to set the movability to static in the add mesh node… I completely missed the details panel option in this node. thought its a property that i change then on the spawned mesh.
And aftera bit of thinking its logical why: This allows to tweak the setting in a BP to static but only at spawning, not during ticking. So its suitable for the construction script :slight_smile:

Now it looks much much better :

Only the vieport does not seem to reflect transforms when the actors are static. in the level they are created at the correct positions.

Thanks again for all the help. :smiley: