How do I stop Get Actor Location from negating my Y values?

So here’s the situation, I’ve got these cargo containers floating from tunnel A to tunnel B, and then getting teleported back to A when they touch the trigger on the right here.

(I’ve moved the tunnels out of the way, but where the boxes begin is where the boxes are supposed to teleport in)

The problem is that, over time, large gaps begin to form in these trails. After investigating I see that for some reason, some containers teleport in further away than others, for seemingly no reason?

Demonstration: https://youtu.be/aWCJEv8Opbk

Level Blueprint for the trigger volume, when an actor touches the trigger, I want them moved a finite distance to the left:

Blueprint for the cargo container:

Effectively I have two separate timers here. The first slowly moves the object to the right, the second slowly bobs it up and down.

So far, I’ve yet to discern the difference between the good cars and the bad cars, but it appears to consistently afflict the same ones. But what I have noticed is that it seems like the Get Actor Location node is making the Y value negative for these before performing the calculation. The location in the Details panel is positive before touching the trigger, but is negative when the math is performed

Before and after, the Pink text is what Get Actor Location returns, the Blue is the math, and of course note the Y values in the Details panel.

Could it be performing the calculation twice?

It is! This means On Actor Begin Overlap is triggering twice! But why? Why these containers? And how can I make it NOT do that!?

Okay, I fixed it. I add each actor to an array, wait a bit, then remove it. Then I add a check at the beginning of the event to see if the actor we’re overlapping exists in the array. If so, do nothing.

1 Like