Hey all. I have this script which allows my Player to read a piece of paper by clicking on the collider, however, they can click it from across the map. I want to add a, On Trigger Stay line that prevents them from clicking it from afar. Where would I add this? I’ve dealt with OnTriggerStay before, but I don’t know how to implement it here.
If I understand the question correctly, you want to select objects by clicking on them from a first person view. If so, I would use the Physics.Raycast function and check in the hitInfo if the hit was close enough.
Check this scripting reference example:
And the Physics.Raycast documentation: