I can't find a way to get this Raycast to hit the water surface, what am I missing?
RaycastHit hitInfo;
Ray headRay = player.eyes.HeadRay();
if (Physics.Raycast(headRay, out hitInfo, maxDistance/*, (Rust.Layers.Solid | Rust.Layers.Mask.Water)*/)) I can't find a way to get this Raycast to hit the water surface, what am I missing?
RaycastHit hitInfo;
Ray headRay = player.eyes.HeadRay();
if (Physics.Raycast(headRay, out hitInfo, maxDistance/*, (Rust.Layers.Solid | Rust.Layers.Mask.Water)*/))