Change the return type of ray casting.