I'm having some unpredictable results when performing hit testing on my meshes. It works sometimes but not others.
I can see when DXScene.GetClosestHitObject(pickRay) returns null, it is always when DXScene.GetRayFromCamera() method returns a Direction = Nan (the Position is populated though)
What circumstances can this happen? Most of the time, I need to rotate the camera a bit and then it starts working again.
I wonder if I'm doing something incorrect with regards to scene refreshing.
Note: I am using a similar method to winforms DXRenderControl sample in preparing my control/3D scene if that makes any difference.
Curiosuly, TargetPositionCamera.FitIntoView() also doesnt work (it doesn't set the distance). (related?)
TIA
Simon
I can see when DXScene.GetClosestHitObject(pickRay) returns null, it is always when DXScene.GetRayFromCamera() method returns a Direction = Nan (the Position is populated though)
What circumstances can this happen? Most of the time, I need to rotate the camera a bit and then it starts working again.
I wonder if I'm doing something incorrect with regards to scene refreshing.
Note: I am using a similar method to winforms DXRenderControl sample in preparing my control/3D scene if that makes any difference.
Curiosuly, TargetPositionCamera.FitIntoView() also doesnt work (it doesn't set the distance). (related?)
TIA
Simon