Hi guys. Today, I were testing arrow barrage event, which utilize raycasting. But during tests I have found that clouds block them.
Clouds have their collision group set to “Clouds”, which can collide only with Default and StudioSelectable.
Arrow’s Raycast Collision group is set to “Islands”, which can collide with: Default, StudioSelectable, and Itself.
So, I expect that arrows won’t detect clouds, but they are. Why?
local ArrowHitParams = RaycastParams.new()
ArrowHitParams.FilterType = Enum.RaycastFilterType.Include
ArrowHitParams.FilterDescendantsInstances = {workspace.GameObjects}
ArrowHitParams.CollisionGroup = "Islands"
local ArrowHit = workspace:Raycast(Start, Direction, ArrowHitParams)
if ArrowHit then
print("Detected") -- printed for clouds too.
end
Why this occurs? This behavior of Raycasting breaks big part of game logic.