in codea I know that it has a 2d ray casting method. But does codea allow for 3d ray casting like some game engines do?
No, unfortunately it does not, but where there is a will there is a way!
@Archimedes - you can do 3D raycasting yourself
https://coolcodea.wordpress.com/2015/04/09/209-3d-ray-tracing-revisited/