Ignoring Colliders/LayerMask with Raycasting

I am trying to make a raycast that would be able to have hitbox on the object it raycasts. Originally i tried putting a collider on the object it self, but it just messed up raycasting. So as a solution i tried making a child of that object and putting it in front of the parent, but since raycasting works of collider/triggers it still got mest up, so I tried using LayerMask in the raycasting note that would make the raycast ignore a layer. But when it came to converting the LayerMask to and int value i didnt find a note that would convert it correctly ,since every single one i tried just broke the whole Udon behaviour. So does anybody know a right way to conver a LayerMask string to a proper int value?

The node you’re looking for is “Layermask get value”

1 Like

Thanks a bunch