Lets say that I have a ray starting from point A to point B as well as a LIMITED distance.
How do I make sure that the ray is always limited to the distance?
D3DXVECTOR3 vRayFrom(0.0f, 0.0f, 0.0f);
D3DXVECTOR3 vRayTo(0.0f, 1000.0f, 5000.0f);
float limitedDistance = 50.0f; // The distance is only limited to 50.0f so the actual ray should be much shorter
Raycasting(vRayFrom, vRayTo, limitedDistance);