I'm trying to implement pickable items using a button.
I've implemented the check of "Player facing direction of item in certain angle".
However, I wanted to implement the distance feature which would need one of these 2 solutions:
1. Player to RayCast to check if there is a pickable in the distance
2. The item to SphereCast to check if there is a player in the vicinity
I have issues with both solutions:
1. I'd like to keep all the logic of showing the GUI and handling the pick up in the PickUpScript that's why I don't like solution one.
2. Running SphereCast on all the pickable items seems heavy for me (maybe it isn't?)
What would the preferable solution be?
↧