I want to be able to program functions like "FindObjectsInSphere", "FindObjectsInCameraView", or "FindObjectsInArcCone" (the last one is a subsection of a sphere bounded by an angle from the forward axis), but is there a better way of finding objects in a given area than starting by making a temporary trigger and seeing which objects overlap it before deleting it?
I have programmed some similar functions for finding players already, what I'm looking for is the best way to find objects within a given basic area so I can use that to construct more complex options for finding objects.
Edit: In some cases I may know what kind of object I'm looking for, but for others (such as checking whether something's obscured) I may not actually know what object I want to find. It should also be noted that I do wish to operate on Projectiles as well, as although they have their own position functions, they inherit from CoreObject.
Also, this code is going into a Rangefinder API which I intend to post to community content, which will include a number of useful functions for finding objects and where they are in relation to other objects.