Adding basic ray casting functionality (part 1)