1 - I want to make a list of all game objects with a certain tag that are close and in view of the camera. I know how to check if an object is close and in view of the camera when I have a set GameObject variable I can check, but I don't know how to add multiple objects to a list based on that.
2 - I also need to find which object in the list has the lowest or highest x or y value on this Vector3 “Vector3 directionOfObject = transform.InverseTransformPoint(theObject.transform.position);” which is based on their position, and be able to set a “GameObject” variable equal to that object.
Can anyone help me?
Also I don't know if this is important but this script is connected to the camera.