Set Static Mesh" function and Static Mesh component in Level Blueprints broken?

I put this question by mistake on the Rocket forum first. So here’s it again.

I was trying to change the mesh of a static mesh actor I put up in a level, along with its material. While the material does change dynamically, whenever I recompile the level blueprints, the Static Mesh component loses it default mesh value and does not accept anything again.

Is this a bug or am I doing something wrong? I want this in Level blueprints only, because then I have to set it up with Matinee actors, which don’t work with the other blueprint actors.

Please post your BP graph :slight_smile:

Rama

I am trying to make a tutorial here so I’ll try to not give spoilers :stuck_out_tongue:

But here you go.

The whole thing is, that I have put 3 different Static Mesh actors in the scene, with a Matinee and Material of each of them. I am using a Switch mode too, on each switch there is 1 “Set Static Mesh” node. And after each of these is a Set Material and Matinee node. This is supposed to set a different static mesh on each SM Actor, with a different Material as well as a Matinee path on each switch. But the whole thing goes for a toss in the beginning itself, when the required SM Actor is not set to a chosen SM taken from the Content Browser. :frowning:

Also, the “Rocket 01” node that you see, I selected a SM Actor in the level, came to BP graph, did a right click and added a reference for the Actor, which gave me this node. The Target node, sort of typecasts the SM Actor to a SM component.

#Mobility = Moveable

Static Mesh’s wont change their mesh unless they are set to Mobility::Moveable

:wink:

I encountered this same issue when trying to set Static Meshes via C++

I do believe it is expected behavior, because the shadow shape and lighting has to change if you change a static mesh, and Mobility::Moveable uses all the dynamic lighting fabulousness of UE4 :slight_smile:

Rama

I have set it to that too, since the start. If its not Moveable it won’t even get accepted in Matinee. But it still bugs me :frowning:

I could however do with BluePrint actors, but then they don’t accept Matinee sequences and all basic animation is done only with Timeline :\

#Solution

Delete all of your blueprint related to setting static mesh (like the 4 nodes in your pic)

  • go into the level

  • select the SMA whom you want to change the mesh for

  • do a filter for Set Static mesh

  • add that node

it will automatically add a reference to your selected mesh actor

  • pick the mesh using that grid icon/array icon

  • Then activate this node sequence (two nodes) on key press or level start or whatever

  • Set the Static mesh actor you chose in level and press F4

  • Set the Mobility to Moveable

Done!

#Summary

Send the Actor into Set Static Mesh instead of the static mesh component

Rama

PS: I just tested this as working!

Wow! ok!

Will try this…and add your acknowledgement. :slight_smile:

On the other hand, while being desperate to make this work, I even came up with a solution to link the Blueprint actor to Matinee :smiley:

Will add both techniques in the tutorial.

Next question. A little personal, if I may ask: Where are you from, and where do you work? :slight_smile:

Next question. A little personal, if I may ask: Where are you from, and where do you work? :slight_smile:

I run my own healing business at www.evernewjoy.com

So I work from home :slight_smile:

I am not sure exactly what “where are you from?” is asking,

so I’ll say I am from the Universe

:slight_smile:

Rama

Aah!! Wow! a versatile man! :slight_smile:

After you said Universe…I can’t ask you anything else :slight_smile: Peace out!

And thanks for sorting the doubt!