aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/hit-record.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/3D/hit-record.js')
-rwxr-xr-xjs/helper-classes/3D/hit-record.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/helper-classes/3D/hit-record.js b/js/helper-classes/3D/hit-record.js
index 2c60adc6..265bf2a4 100755
--- a/js/helper-classes/3D/hit-record.js
+++ b/js/helper-classes/3D/hit-record.js
@@ -232,7 +232,15 @@ var HitRecord = exports.HitRecord = Object.create(Object.prototype,
232 var elt = this.getElt(); 232 var elt = this.getElt();
233 viewUtils.pushViewportObj( elt ); 233 viewUtils.pushViewportObj( elt );
234 var viewPt = viewUtils.screenToView( scrPt[0], scrPt[1], scrPt[2] ); 234 var viewPt = viewUtils.screenToView( scrPt[0], scrPt[1], scrPt[2] );
235 var eyePt = viewUtils.getEyePoint(); 235 var eyePt;
236 if(viewUtils.getPerspectiveDistFromElement(elt))
237 {
238 eyePt = viewUtils.getEyePoint();
239 }
240 else
241 {
242 eyePt = [viewPt[0], viewPt[1], 1400];
243 }
236 var projPt = MathUtils.vecIntersectPlane( eyePt, MathUtils.vecSubtract(viewPt,eyePt), plane ); 244 var projPt = MathUtils.vecIntersectPlane( eyePt, MathUtils.vecSubtract(viewPt,eyePt), plane );
237 245
238 return projPt; 246 return projPt;