Browse Source

Fix orientation of raycast hit

Garrett Johnson 5 years ago
parent
commit
8655e35541
1 changed files with 1 additions and 0 deletions
  1. 1 0
      example/index.js

+ 1 - 0
example/index.js

@@ -270,6 +270,7 @@ function animate() {
 		if ( closestHit.face ) {
 		if ( closestHit.face ) {
 
 
 			const normal = closestHit.face.normal;
 			const normal = closestHit.face.normal;
+			normal.transformDirection( closestHit.object.matrixWorld );
 			rayIntersect.lookAt(
 			rayIntersect.lookAt(
 				point.x + normal.x,
 				point.x + normal.x,
 				point.y + normal.y,
 				point.y + normal.y,