traceline is a built-in function that does a raycast in the world.
See also:
https://quakewiki.org/wiki/traceline