瀏覽代碼

fixed rotation in hide

Nicolas Cannasse 3 年之前
父節點
當前提交
eb0597fd4a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      hrt/prefab/l3d/MeshSpray.hx

+ 2 - 1
hrt/prefab/l3d/MeshSpray.hx

@@ -278,10 +278,11 @@ class MeshSprayObject extends h3d.scene.Object {
 		if( mp.binaryMeshes != null ) {
 		if( mp.binaryMeshes != null ) {
 			var tmp = new h3d.Matrix();
 			var tmp = new h3d.Matrix();
 			var absPos = getAbsPos();
 			var absPos = getAbsPos();
+			var degToRad = Math.PI / 180;
 			for( c in mp.binaryMeshes ) {
 			for( c in mp.binaryMeshes ) {
 				var mesh = loadMesh(c.path);
 				var mesh = loadMesh(c.path);
 				var batch = getBatch(mesh);
 				var batch = getBatch(mesh);
-				tmp.initRotation(c.rotX, c.rotY, c.rotZ);
+				tmp.initRotation(c.rotX * degToRad, c.rotY * degToRad, c.rotZ * degToRad);
 				tmp.prependScale(c.scale, c.scale, c.scale);
 				tmp.prependScale(c.scale, c.scale, c.scale);
 				tmp.tx = c.x;
 				tmp.tx = c.x;
 				tmp.ty = c.y;
 				tmp.ty = c.y;