|
@@ -160,9 +160,9 @@ THREE.Mesh.prototype.raycast = ( function () {
|
|
|
distance: distance,
|
|
|
point: intersectionPoint,
|
|
|
face: new THREE.Face3( a, b, c, THREE.Triangle.normal( vA, vB, vC ) ),
|
|
|
- faceIndex: null,
|
|
|
+ faceIndex: Math.floor(i/3), // triangle number in indices buffer semantics
|
|
|
object: this
|
|
|
-
|
|
|
+
|
|
|
} );
|
|
|
|
|
|
}
|
|
@@ -206,7 +206,7 @@ THREE.Mesh.prototype.raycast = ( function () {
|
|
|
distance: distance,
|
|
|
point: intersectionPoint,
|
|
|
face: new THREE.Face3( a, b, c, THREE.Triangle.normal( vA, vB, vC ) ),
|
|
|
- faceIndex: null,
|
|
|
+ index: Math.floor(i/3), // triangle number in positions buffer semantics
|
|
|
object: this
|
|
|
|
|
|
} );
|