I wondering if there was a way to check raycasting on a range of angles.
in context:
this code is how i am currently checking if my character is colliding with a nearby wall.
distf = transform.TransformDirection (Vector3.forward);
if (Physics.Raycast (transform.position, distf, 2))
{
canmoveforward = false;
}
else
{
canmoveforward = true;
}
what i want to do is check a range of angles (ie 0 - 89 degrees) to see if the path is clear for my character instead of just checking the front back and side.