aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/hit-record.js
diff options
context:
space:
mode:
authorAnanya Sen2012-04-17 18:11:55 -0700
committerAnanya Sen2012-04-17 18:11:55 -0700
commit35abad196cc9feb76ef50c1b63032a38233a6d51 (patch)
tree914689c66d4ab6c6e088b571eade0a0e35082916 /js/helper-classes/3D/hit-record.js
parent1f891c58bad0b7746659aa4138001b5ee76d9a0e (diff)
parent616a8532099fec2a15855eac97cd85cb60c4451c (diff)
downloadninja-35abad196cc9feb76ef50c1b63032a38233a6d51.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into Codeview-improvements
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;