I am currently working on a Minecraft clone (a voxel game). The feature I'm working on is the ability to break blocks. I have a ray-casting/ray tracing algorithm for traversing the voxels, but the only thing I don't know how to do is find the direction vector of the ray.

How can I find a unit vector representing the direction of a ray in 3D space given the pitch and yaw degrees of the ray (and the ray origin, of course)?



You must log in to answer this question.

Browse other questions tagged .