I'm well aware of how magnitude
works, however I find it's use highly impractical in this case. I have a huge game I'm working on, consisting of many objects. So iterating the entire workspace and everything inside it every fraction of a second or so to check the magnitude between the player and the object, seems excruciatingly memory intensive (not to mention the very noticeable lag that comes with it).
So basically my question is, is there any way to find out if a object is near your character, without constantly iterating the entire world? Maybe Ray Casting is an option? Sorry I don't have any code to provide, I'm just very unsure of how I'd go about this.
Thanks for reading, if you have any insight on how I could go about doing this, I sure would appreciate it!