I’m having a problem with an interaction system I’ve implemented from a YouTube series. Whenever I’m trying to pick up an item and destroy the actor, I cant interact with any other item that I am overlapping.
For clarification, lets say I have two items and I have overlapped my character with both their collision spheres. The system adds these two items to a list and checks if the forward vector of the character is close enough to the vector between the character location and the location of the item (using dot product). It then chooses the optimal item and allows the player to interact with it.
If I set the interaction to just print a text, I can easily interact with one item, rotate my character and interact with the other. If, however, the interaction deletes the item (or disables its collision sphere), the other item becomes un-interact-able, as if I left the collision sphere. Id have to move away and reenter the collision sphere of the second item in order to be able to interact with it again.
I have here the URL of the video that provided the tutorial on how to implement the system. I would really appreciate it if anyone can explain as to why I may be having this problem. Thank you!