Overlapping multiple objects from the same class

So I am trying to have a shape that every time it overlaps with another actor that actor’s scale change. I got a couple of issues. One of them is for some reason if I do begin and end overlaps I get an infinite loop. Like it does count more than once when overlapping so I use a do once node but then I get the second issue where if I overlap more than one actor then one or more of them does not scale back when ending the overlap because it’s set to Do Once only. They simply are too close to each other so they get in conflict with that Do Once node. Is the right solution creating an array for each actor overlapped and recall them when ending overlap? How would you solve this?

Ok the problem seems to be that this is a base weapon so I get a hit for every single child of that weapon as they are only hidden. Any way to overcome this or do I have to spawn the weapons when switching and not just hide them? So only one weapon is active at a time.

Regarding your first post, this is what I understood you are after:
OverlapScaleTest

Is it?

1 Like

Yes that exactly what I go the only problem is that I have a cone attached to the weapon do to basically what you did with that cube but I am using a system where all weapons are attached to the character and only making visible one at a time. They are child copies of the main base weapon so what I think is happening is that all of them are overlapping because I get exactly 3 overlaps each time. Which is the number of weapons right now.

I did test it now again with one weapon and I don’t get 3 overlaps but I get an infinite loop. I guess there is something I am not aware off that I should be using after it overlaps and ends overlap. I tried using a once node and it works but sometimes some cubes remain scaled down. I wonder if I should be using an array and do a for loop or something. What was your solution?

What I did is a bit simple, but it might show you another way to achieve what you are after:

This could be vastly expanded upon, and should never trigger infinite loop regardless of how many overlap.

Hope it helps.

Hey thanks a lot for taking the time to make that and I am gonna test it now as I never thought of doing like that. Actually it won’t change the scale but rather it will play an animation but this applies to that too I guess. Just going back and forth in the timeline. I’ve never done an animation playing and reversing on a timeline. Any experience with that and/or possible problems?

Update: Your solution works great. Thanks a lot man.

1 Like

Hey man so after making an animated asset everything is working as expected except for one thing. While the cubes I had all resize at different times based on their own current overlapping state. In this case as I am using an Actor AnimBP in order to run the animation based on a simple boolean to move back and forth, I am getting all the copies to run at the same time. Would you know anything about that and how to make them run like different animBPs so they are not synchronized. I tried using child copies but they is no difference.