Issues transforming static meshes spawned from blueprint

Hi everyone, I’m new to this so apologies if I’m 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 player at same time in a linear fashion, however only first mesh from each loop moves and it stops moving when next loop starts. I’ve included a screenshot of relevant part of blueprint below, I hope it is of some help.

Thanks!
Brad

63275-arraymovement.jpg

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

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

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

I’m assuming that I need a way to keep referencing old objects while 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.

Brad

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

Hi Merkin,

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

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

Hope that helps!

Thanks so much that worked perfectly!

I can see how different loop types work now.