function SpreadSimulator.GetSpreadDirection(q,K)local H=q.rng:NextNumber(0,360)local r=CFrame.Angles(0,0,-H)local G=K*r local U=q.rng:NextNumber(-q.currentSpread,q.currentSpread)/2 local v=G.UpVector*(q.currentSpread*U)return K.LookVector*Spread_Distance_From_Camera+v end
-- Creates a vector which represents a direction for a projectile to travel based on the cameras CFrame
-- @param CFrame cameraCFrame
-- @return Vector3
function SpreadSimulator:GetSpreadDirection(cameraCFrame)
	-- Roll random angle
	local randomZ = self.rng:NextNumber(0, 360)
	-- Make cframe based on random angle
	local randomAngleCFrame = CFrame.Angles(0, 0, -randomZ)
	-- Rotate camera cframe
	local rotatedCFrame = cameraCFrame * randomAngleCFrame
	-- Get a random point based on the circumference
	local randomMagnitude = self.rng:NextNumber(-self.currentSpread, self.currentSpread) / 2

	-- Make spread vector based on current spread and the random point on circumference
	local spreadDirection = rotatedCFrame.UpVector * (self.currentSpread * randomMagnitude)

	return cameraCFrame.LookVector * Spread_Distance_From_Camera + spreadDirection
end
