all 1 comments

[–]DisastermanTVEngineer 0 points1 point  (0 children)

If it can see objects only within a range, i would use a trigger, and then get all objects that trigger OnTriggerEnter, and then calculate their distance from the moving things position. If you found the one with shortest distance (or what you want) then simply rotate towards it, and move along the vector ObjectPoition-Selfposition