Adds support for raycasting with morphs

Better slow and correct than a fast but wrong.
Written out elementwise to try and minimize function call overheads.