Making a radar system for a game and need to shoot out a ton of rays (as per the request of the hire-ie.) so I can make a sort of cone radius. I will link a video below for an example.
(The one I am currently trying to replicate is the one that is more opaque and is shooting into the sky)
Since I need to shoot so many rays very frequently (every second or two maybe less) I need a way that won’t be to heavy on resources as it will be server sided and how I would handle as many ray casts.
I have thought about something like this:
Create rays → put into list → setup rays (position, angles etc) → handle feedback if there is any → clear list/rays → repeat
you could use sphere cash to get a shape similar to a cone. raycasts can be very taxing and it wouldn’t be efficient at all to have THAT many every second. you’d get a similar outcome too that may be even more accurate
I am not too sure what you mean by ‘sphere cash’ could you explain and if possible show an example of how its used?
Im aware but they need it to be used with rays. Im thinking of seeing if I can reduce the amount of rays used however its going to be covering large radiuses of the sky within that cone.
For size reference the furthest you can see a person is 1 and 1/5 of a mile (the map is very very big). So you can see why I need such a wide cone radius with many rays at once.
i meant spherecast, you can basically cast a giant ray in the shape of a sphere outwards, its covers as much or maybe a little more of that cone shape you wanted, and it only requires one ray versus a bunch of rays
I’ve been looking into collections service instead and just tagging certain parts with a tag that will be used instead of shooting rays all over the place.
Wouldn’t that be a bit healthier than rays? If I’m not wrong I believe so.
depends on what you’re trying to accomplish, do you care about reading for AI or trying to measure their velocity? if so collectionservice is 30x better and less memory intensive