So you use it for what.. checking line of sight? obstacles? I'm sure it's very powerful, but I can't think of ways to actually use it.
For example I used
cast_ray for cRPG rageball for correct bouncing of the ball when it hits a prop. The pos that is returned by the cast ray function also contains the normal of the hit surface, which allows me to calc the new speed vector of the reflected ball.
In that case I used cast ray on props like I earlier used
position_align_to_ground to get me the normal of the earth surface so I could make halfway correct ball bouncing on uneven ground.