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"

Issues transforming static meshes spawned from blueprint

Hi everyone, I'm new to this so apologies if I'm asking questions with obvious answers.

I'm having issues moving blueprint static meshes spawned from an array. Each loop creates a few meshes (their positions are obtained from a function) that I want to move towards the player at the same time in a linear fashion, however only the first mesh from each loop moves and it stops moving when the next loop starts. I've included a screenshot of the relevant part of the blueprint below, I hope it is of some help.

Thanks! Brad

alt text

Product Version: UE 4.9
arraymovement.jpg (35.4 kB)
more ▼

asked Oct 18 '15 at 02:33 PM in Blueprint Scripting

avatar image

25 1 3

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

2 answers: sort voted first

Hi Merkin,

It sounds like you're doing the Spawn in a loop, right? If so, Tick is only grabbing the return value of the most recent loop iteration and moving its Static Mesh Component. If you want to perform AddLocalOffset on each, you need to reference each individually. The easiest way to do this would be to use an array:

alt text

Obviously your values will be different, but this is a basic setup to emulate.

Hope that helps!

more ▼

answered Oct 22 '15 at 09:40 PM

avatar image ZEROONESTUDIO Oct 29 '15 at 07:39 AM

Thanks so much Ben that worked perfectly!

I can see how the different loop types work now.

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

Your event tick is not connected to the rest of your nodes. What you need to do is use a get world delta seconds node and multiply your vector with it.

more ▼

answered Oct 20 '15 at 12:49 PM

avatar image

2k 62 24 111

avatar image ZEROONESTUDIO Oct 22 '15 at 05:21 AM

Hey thanks for taking the time to look at my problem - I really appreciate it!

So I've updated the blueprint as suggested (see below) but I'm still getting the same result. The problem is that once the loop creates an object, it 'forgets' about applying the transform to the previous objects.

I'm assuming that I need a way to keep referencing the old objects while the loop is creating new ones, though I'm not sure how to do this. I'll have a dig around some other blueprints and see if I can figure it out.


UPDATE: I should mention that I put the 'Is Valid' check in there as I was getting several 'Accessed None' errors from the AddLocalOffset. This seems to reinforce my suspicions above but doesn't help me with a solution unfortunately.

alt text

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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