Просмотр исходного кода

Fix orientation of raycast hit

Garrett Johnson 5 лет назад
Родитель
Сommit
8655e35541
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      example/index.js

+ 1 - 0
example/index.js

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