Hello all, I am having a bit of trouble using the new shapecasting ray types, blockcast seems to be fine however spherecast is giving this strange issue where it is detecting half of a sphere, offset to where it should be, here is a video.
game:GetService("RunService").Stepped:Connect(function()
local ray = workspace:Spherecast(script.Parent.Position, script.Parent.Size.X, script.Parent.CFrame.LookVector)
if ray then
print(ray)
end
end)
I’ve tried to position and shoot the sphere at the same point, to no avail as well as try to offset it by -/2 of my objects size and shoot it toward an offset of +(2/size), to no success.
if you offset it back by 3 studs, it seems to detect your character.
game:GetService("RunService").Stepped:Connect(function()
local ray = workspace:Spherecast((script.Parent.CFrame * CFrame.new(0, 0, 3)).Position, script.Parent.Size.X, script.Parent.CFrame.LookVector)
if ray then
print(ray)
end
end)