aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/hit-record.js
diff options
context:
space:
mode:
authorEric Guzman2012-04-11 11:03:09 -0700
committerEric Guzman2012-04-11 11:03:09 -0700
commitd203070579c8106b846657592a794ca8b4b1a9b6 (patch)
treea68566e581dbb96c5463031cb31131fbac8aa066 /js/helper-classes/3D/hit-record.js
parent435dde54bf607620947007f7c66bd98bd03fe90b (diff)
parent9d1c919a4865ab1a2b0b0b9fc893a54b145c82c0 (diff)
downloadninja-d203070579c8106b846657592a794ca8b4b1a9b6.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
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;