#players in radius
1 messages · Page 1 of 1 (latest)
Option 1: get closest, if distance less than radius, add to list, remove them from get closest's target input list & put that through a loop. (simpler, probably cheaper)
Option 2: Overlap Sphere (collision data weird but overall works)
The 2nd option is honestly the best one to do, it also sorts the list by Distance!
get closet would be sorted by distance too xD
Yee but it would not output a list, and you would need to put them into a list that is the same as everyone else's lists lol
Overlap Sphere already outputs a list (even though it is Collision Data), and sorts by Distance, and is the same for everyone depending on when it was executed. If you wanted a Player list, you would still need to loop through the data and put them into a list for everyone, but this way it is done faster since it is sorted by Distance and the same Collision Data for everyone already
it would tho, thats y i say add to list
its also time dependant too, as if you want it synced, u could run for everyone.
in the long run overlap sphere would be better tho as i dont think heat inceases that much by how many is in there? But ye, my main issue is collision data
Get all players > For Each > (GET DISTANCE FROM YOU) > Less than > If > (DO OTHER ACTIONS)
No no no that is the most CPU-Intensive method you can do. Do not do this please lol.
Overlap Sphere is one execution mostly, unless you want to convert the list into a proper List<Player>
Checking your own Distance, then sending an Event to everyone saying "Hey! I'm in the radius!" is also one execution (other than adding to a list.)
You can also run it locally I think that removes CPU
running locally would ensure no NET use, it dosent reduce CPU at all besides from not running the chips sending events
Assuming OP left,
but like y 💀
y there so many ppl that just ask & vanish
at least this could serve useful fir those tryna search in the future
I don’t think you know what Net or CPU is
I don’t know much about it
CPU is how much the Circuits can be handled at a Tick
Net is the Volume of circuits that’s being run for everyone