Checking collision of pickable item

I am trying to make a VR game, and I want spellcasting to be based on gestures. The problem here is that I want it to be used with any pickable weapon. So I need to check if item’s hitbox overlaps with one of 6 hitboxes, levitating close to my character. How can I do this?

Hey @danchik6785

I imagine that you want to use the pickable weapons as “magic wands” and move them in specific patterns to cast a specific spell, right?

What I would do in this case is to add a Box Collision component to the pickable weapons and then check on each floating hitbox’s “OnBeginOverlap” event if that component overlapped. If so, you can add something that identifies that hitbox to an array stored in the character (it could be an int or a tag that represents that specific hitbox) and then check if the order of identifiers in that array matches with the order required by the spell to make it castable.

Let me know if that helps you or if you need help with the implemntation!