Download

Moving All Actors in Trigger to a Specific Location

I’ve a task in which I have to move All actors present in a Trigger at a Time to Specific Location. I am using MoveComponentTo with GetOverlapping Components and Foreach loop but its not working.

I tried using it with lerp or vinterp too but in them it didn’t work either. The thing is nothing is happening at all. I tried doing it in level blueprint but still nothing happened.

50fdae92e7070c9534cdb35a4dc418fc4e50c4b4.jpeg

Earlier When I was trying to use lerp on key press (I kept it on keypress just to test in end it will be automated) it was moving only 1 object and on the next key press it was moving next object. I don’t know what is happening for this.

Please look into this and help me out.

You’re trying to move actors, but are using ‘move component to’? Why not use ‘set actor location’? Also make sure that the actors you want to move have the right collision responses. I also found that I was having troubles with using ‘get overlapping actors’ and found that it might only work if the trigger/actors have ‘generate overlap event’ enabled.

Try using the nodes “get overlapping Actors” and “set actor location”

I tried using that too but the problem is that moves only 1 actor element in trigger.
If I’ve to move all I’ll have to press key 2 (input event for testing) n number of times.

Why not create a custom Blueprint and in that create a new array variable that can hold your actors. When overlapping this Trigger Actor you can add those actors into that variable and then loop through them and set actor location.

Here is a quick screenshot for you. This is extended from Trigger Box.

&stc=1

Now the Actors are moving but the thing is they just snap to the new location. I need to show them moving but If I add lerp what it does is it moves them only one step if I add Delta time as alpha and if I make a timeline and use that its not moving them at all. My porblem is in moving actors (all of them to destination).

e45876b242f656afcd69344d3d1f147597123a18.jpeg

I did a workaround by making an event in all Glass Suckable components and calling that event.

Can you give me some good tutorials on Blueprint Interfaces.

This is a pretty awesome tutorial for blueprint communication including Interfaces.

https://www.youtube.com/watch?v=EM_HYqQdToE&list=PLZlv_N0_O1gbggHiwNP2JBXGeD2h12tbB&index=6

Thanks man for help!!!
Appreciate it.