소스 검색

Fix "followPositionOnly" clearing object scale and rotation

trethaller 6 년 전
부모
커밋
726318debc
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      h3d/scene/Object.hx

+ 4 - 3
h3d/scene/Object.hx

@@ -622,9 +622,10 @@ class Object implements hxd.impl.Serializable {
 		if( follow != null ) {
 			follow.syncPos();
 			if( followPositionOnly ) {
-				absPos.tx += follow.absPos.tx;
-				absPos.ty += follow.absPos.ty;
-				absPos.tz += follow.absPos.tz;
+				absPos.multiply3x4inline(absPos, parent.absPos);
+				absPos.tx = x + follow.absPos.tx;
+				absPos.ty = y + follow.absPos.ty;
+				absPos.tz = z + follow.absPos.tz;
 			} else
 				absPos.multiply3x4(absPos, follow.absPos);
 		} else if( parent != null && !ignoreParentTransform )