Hi! Would like to ask for some help. I am trying to get a raycast to hit the layermask called "whatIsWall" but for some reason it never seems to detect it / the if statement conditions to compare the layermask is wrong. Could someone take a look for me to see what I did wrong?
bool raycastHit = Physics.Raycast(playerCam.position, playerCam.forward, out RaycastHit firstHit, 2f, whatIsWall);
if (raycastHit && (whatIsWall.value & 1 << firstHit.collider.gameObject.layer) != 0)```