Hey Dev form!
I’m working on a project that uses a lidar type effect, I’m wanting multiple type of scans (Cone, Line, Etc…) One of them I thought of was a sphere scan I started working on it getting it to make a “circle” but im not sure how to make it a 3d.
This is what it looks like right now (Top Down)
And this is the code I have for it:
function LidarController:LidarInSphere(ammount, origin, lidarFrame)
for i = 1, ammount do
local angle = math.pi * 2 * (i / ammount )
local direction = Vector3.new(math.cos(angle), 0, math.sin(angle))
local result = workspace:Raycast(origin, direction*self.LidarDistance, self.rayParams)
if result then
self:PlacePart(lidarFrame, result)
end
end
end
I cant use a sphere cast due to I need the individual points of hit for my effect.
(Close up)
Thanks in advance!