I sort of got it working. This is the code that I used:
m_plane[RIGHT].Normalize(); Vector3D up(0, 0, 1.0f); Vector3D xAxis = up.crossProduct(m_dir); xAxis.normalize(); float distToPlane = m_plane[RIGHT].GetDistance(pos); xDist = distToPlane / m_plane[RIGHT].DotProduct(xAxis);
It almost positions the object correctly, but it's slightly off. I can't figure out where the error is.
Anyways, thanks for the answer ;)