I need some quick RayCasting Help

Hi guys,

Basically I am already using Raycasting in my game to figure out a Vector3 that I then use to latch the player to a wall, basically allowing them to walk on walls.

The Rays are cast, if it touchs an object then it returns a Vector3, and the player is then moved to that position.

This is the script I use for that:

Summary
function latch()														-- A new latch function should be made and raycast should happen in multiple directions
																		-- and used for flying
	local origin = HRP.Position
	local direction = HRP.CFrame.LookVector * REACH						-- Side note this could be used and constantly played during the dash?

	local result = Workspace:Raycast(origin, direction, rayParams)
	if not result then return end

	latchingToWall = result.Normal
	wait(0.5)
	latchingToWall = nil
end

However, I need to remake this script as I need another function that covers more area in the raycast.

I basically want this entire area covered


This RayCast will basically only happen after a Touched happens, so it will only have to fire for less than a second.

I need help with figuring out the direction of the Raycast.

I am unsure of how to cover than big of an area.

Edit:

I believe that I will need to create a pattern for the raycast to follow, and I think that is what I need help with.