|
@@ -159,9 +159,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
|
|
|
-
|
|
|
+
|
|
|
} );
|
|
|
|
|
|
}
|
|
@@ -205,7 +205,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
|
|
|
|
|
|
} );
|