diff options
-rwxr-xr-x | js/helper-classes/3D/StageLine.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/helper-classes/3D/StageLine.js b/js/helper-classes/3D/StageLine.js index c358108f..a9149f56 100755 --- a/js/helper-classes/3D/StageLine.js +++ b/js/helper-classes/3D/StageLine.js | |||
@@ -270,11 +270,11 @@ var StageLine = exports.StageLine = Object.create(Object.prototype, { | |||
270 | var planeEq = plane.getPlaneEq(); | 270 | var planeEq = plane.getPlaneEq(); |
271 | var bNormal = vecUtils.vecCross(3, planeEq, bVec); | 271 | var bNormal = vecUtils.vecCross(3, planeEq, bVec); |
272 | var dot = vecUtils.vecDot(3, bNormal, lVec); | 272 | var dot = vecUtils.vecDot(3, bNormal, lVec); |
273 | if (MathUtils.fpSign(dot) > 0) | 273 | if (MathUtils.fpSign(dot) < 0) |
274 | { | 274 | { |
275 | var d = vecUtils.vecDot(3, lPt1, planeEq) + planeEq[3]; | 275 | var d = vecUtils.vecDot(3, lPt1, planeEq) + planeEq[3]; |
276 | if (plane.isBackFacing()) d = -d; | 276 | if (plane.isBackFacing()) d = -d; |
277 | if (MathUtils.fpSign(d) > 0) rtnVal = true; | 277 | if (MathUtils.fpSign(d) < 0) rtnVal = true; |
278 | } | 278 | } |
279 | } | 279 | } |
280 | 280 | ||