How do Vinterp my spawned actors?

I am trying to spawn my coins in the center of a crate, and once the player breaks it, it spawns my Coin actors around the crate, and then Vinterps them to my desired location.

Issue 1, the Vinterp does not work, and only works when I use Event Tick
Issue 2, when I use Event Tick, it only Vinterps a singular Coin, and not all my spawned Coins from the loop.

Any help is appreciated!


Hello,
first of all, the issue 1, is not really a problem, because the Vinterps must be played in a “tick” or in a timer to have the effect you want that’s why there is a deltaTime entry, so that the animation does not depend on the frame rate.

For your second issue, it seems that you only kept the reference of the last “spawned” actor. That’s why only one actor is affected.

Here are some advices :
Separate your code in 2 parts :

The first one at the beginning of the game or at the trigger time which will consist in spawn all the actors in their initial position then reference them all in a array.

The second at the tick or in a timer which will iterate through your array of spawned actors,with a foreach loop, and apply the VInterp.

1 Like

I do this by making a Set Array Elem at the end of the SpawnActor blueprint, and then I have a Event Tick that is suppose to Interp the location, but I get no effect doing this. I also get a “Accessed None Error” a million times for the spawned BP.

Hi @DivinalOfficial,

I created a sample project with what you’re describing.

Hope it helps! Let me know if you have any questions about it.

AJ_CoinInterp.zip (869.6 KB)

1 Like

Hey there! Thank you for the reply, and the great demonstration. However, the effect in the project is something I already have working in my current project. What I was trying to do in the OP was vinterp the coins spawning in the circle, so they don’t just instantly pop out of nowhere.

Luckily I did find a work around to this:

I don’t know if this is the best solution, but it does get the results I like

You’re welcome, If it looks good then ship it! :smiley:

Totally different approach, but I’m reminded of a recent thread where the objects would generate a spline to follow on spawn! How can I achieve a item drop effect from games like Diablo/Path of Exile?

(Kinda satisfying that I was able to easily find that thread again by googling ‘unreal engine item drop spline path’ and it was one of the first results!)