Add local rotation to child component in construction script not working

I ran into a problem in a test project I was working on. What I wanted to do was be able to control the rotation of a static mesh component through the construction script. To test this idea I tried to add an “add local rotation” to the static mesh component (the static mesh is a child component of an empty scene component), however this did not work as expected, I expected the mesh to rotate continuously as I move the blueprint object around the scene, however what happened was the mesh component rotated once. Next I changed the target of the “add local rotation” node to the empty parent, now when interacting with the blueprint in the scene the components rotated as expected.

It seems then that the “add local rotation” node only updates the target component once if it a child of another component, but if it the root component it will work fine, is this a bug or am I thinking about this wrong? Thanks.

Not an answer but I think maybe whats wrong is the script usage?

From what you have said the setup may not be working as expected since construction scripts are used to initialize values and objects during the level load. It would only be used I think on spawning to set up the properties but does not run after that.

As far as I know, construction script is executed when you place a blueprint instance onto the map AND when you move it. SO I think you are right.

@ellindell:
If you aim is to rotate your mesh all the time, you should put that inside the Tick() event. Still I think you will need to be in Simulation mode to actually see it.

thanks for responding, actually was able to figure out what I wanted to do another way, this was just an experiment I got sidetracked on and the behavior was unexpected so thought I’d post and see if anyone had any ideas on whats going on under the hood.

I think whats happening is the child mesh component are resetting their initial rotation every time the construction script is called, which make sense.