- Home /
Should Items spherecast
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:
Player to RayCast to check if there is a pickable in the distance
The item to SphereCast to check if there is a player in the vicinity
I have issues with both solutions:
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.
Running SphereCast on all the pickable items seems heavy for me (maybe it isn't?)
What would the preferable solution be?
Your answer
Follow this Question
Related Questions
Picking Up AND Hold Onto Items using Raycasting (Bug) 2 Answers
SphereCast doesn't work with a layerMask 1 Answer
Trigger event from ground and activate the Object-child in the Camera 1 Answer
Raycasting: Holding an Object 1 Answer
Cannot pick up an object that is the child of another robject? 0 Answers