Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: Not Selected
more ▼

asked Jun 26 '14 at 08:32 PM in Blueprint Scripting

avatar image

46 6 7 9

avatar image DJMidKnight Jun 26 '14 at 08:42 PM

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.

avatar image mindfane Jun 27 '14 at 05:04 AM

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.

avatar image elgordostudio Jun 27 '14 at 03:02 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question