I have a fixed camera looking at the player, but when the ray from the camera does not hit the player, i want to cast a ray 10º to the left and right to check if, at this new position the ray hits the player. How can i get these positions that are less 10º and 10º more from the current camera angle to cast a ray to the player?
You can multiply a quaternion with the direction to rotate it.
var rotatedDirection = Quaternion.Euler(0, 10, 0) * direction;