travelan
20-07-2006 12:04:38
Hi all!
I have a problem with RaySceneQuery. This is my code:
itr.MoveNext() is returning false at all times... I think I'm missing something very stupid.
Peace,
Trav
I have a problem with RaySceneQuery. This is my code:
Ray mouseRay = VP.mCamera1.GetCameraToViewportRay(e.X, e.Y);
VP.mRaySceneQuery.setRay(mouseRay);
RaySceneQueryResult result = VP.mRaySceneQuery.execute();
RaySceneQueryResult.RaySceneQueryResultEnumerator itr = result.GetEnumerator();
if (itr.MoveNext())
{
VP.mCurrentObject.SetPosition(itr.Current.getWorldFragment().getSingleIntersection());
}
itr.MoveNext() is returning false at all times... I think I'm missing something very stupid.
Peace,
Trav