Browse Source

Mesh raycast() returning new Face3( a, b, c, normal ) instead of [ a, b, c ] array. See #5164.

Mr.doob 11 years ago
parent
commit
fe69ad0c29
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/objects/Mesh.js

+ 2 - 4
src/objects/Mesh.js

@@ -169,8 +169,7 @@ THREE.Mesh.prototype.raycast = ( function () {
 
 							distance: distance,
 							point: intersectionPoint,
-							indices: [ a, b, c ],
-							face: null,
+							face: new THREE.Face3( a, b, c, THREE.Triangle.normal( vA, vB, vC ) ),
 							faceIndex: null,
 							object: this
 
@@ -229,8 +228,7 @@ THREE.Mesh.prototype.raycast = ( function () {
 
 						distance: distance,
 						point: intersectionPoint,
-						indices: [ a, b, c ],
-						face: null,
+						face: new THREE.Face3( a, b, c, THREE.Triangle.normal( vA, vB, vC ) ),
 						faceIndex: null,
 						object: this