How to use only the needed result of raycastAll?

They raycast function I made allows you to do a raycast that ignores rigidbodies on certain layers/group. Is that what you want?