Overlapping and attaching problem (looking for a better solution)

There is a small problem in the following situation and I would like to know if there is a better solution to solve it because I think that my solution, although it works, is not the correct one.

This is the context:

CASE 1:
-A pawn carries a red object to a box collision.
-When the overlap occurs the red object is attached to the green object.
-This works great!!!

CASE 2:
-Now the red object is inside the collision box
-The pawn has to enter inside the box
-Then the pawn must take the object
-Then the pawn must come out of the box collision.
-Then the pawn must re-enter the collision box so that the overlap can occur.

Can you see the problem?
I think everything would be easier if there was some way to know if the red object is inside or outside the box.

I don’t know, but I feel that getting out of the box to get back in is not the typical solution to this problem.

Can someone tell me how is the right way to handle this situation?

Thank you very much!!

You can check if the box is overlapping the object at the moment of picking it up.
[Is Overlapping Actor] node does exactly that. If it does, do the same that you do on BeginOverlap.

3 Likes

I’m going to try that.
I’ll tell you if it worked.
Thank you very much for your help!!

it works perfect!! Thank you so much!! :sparkling_heart: