ray casting that actually works