Consider a player is holding an object like a battery, and when the let go of the object, the game needs to check if its overlapping the correct location where its supposed to go eg: a generator
In playmaker how to do check if two objects are overlapping?
Pseudo code: On item drop -> if battery is overlapping generator -> snap battery to generator battery compartment
One approach I've tried is that the battery is using a trigger on enter event to check which other object its constantly colliding with and storing that in a game object variable, then when the player lets go of the object I check if that variable is equal to the game object name of where it "should" go and if they match then it snaps to that position. But i feel like there's an easier way to accomplish this.
thx