Spawn ai class at location

Hello, so i have mechanic in which upon collecting fruit snake segment spawns behind. Works okay although the snake segments don’t spawn directly behind one after each other but at the point where the fruit was even though location has been specified to spawn directly behind… Situation showed on the gif and spawn blueprint showed on the picture, many thanks in advance for the help.

Because the spawning of the pawn class takes a few ticks to process - while the actor it is connecting to has been mobile.

The result is that the spawn location is where the connection would be at the moment it is called (when the fruit is collided with) - but the connecting actor is now in a different location.

.
One way to get around that…
Add a variable to contain a reference to the parent actor it will be attached to - editable and exposed on creation.

Pass a reference to the pawn/actor it should attach itself to as it is created.

.

In the Construct graph for the pawn - have it get the world location of that ‘parent’ actor and move to the appropriate point.,

Because it is done on construct, it “appears” at the adjusted location, but doesn’t get the location until it is introduced to the map so that there is no ‘lag’ time between it and the parent.

.

(nice effect btw)

Cheers! works great now, had to subtract roughly 100 though from the location as sometimes ai would get stuck somewhere and don’t spawn.
Screenshot for people interested:

Many thanks for helping and kind words.