TargetPositionCamera.GetRayFromCamera() sometimes returns Direction = NaN
#1
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
  


Messages In This Thread
TargetPositionCamera.GetRayFromCamera() sometimes returns Direction = NaN - by siik - 10-08-2021, 10:54 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)