浏览代码

better precision on drag'n'drop

Nicolas Cannasse 5 年之前
父节点
当前提交
06e55cad31
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      hide/comp/SceneEditor.hx

+ 3 - 3
hide/comp/SceneEditor.hx

@@ -1538,9 +1538,9 @@ class SceneEditor {
 		var localMat = getPickTransform(parent);
 		var localMat = getPickTransform(parent);
 		if(localMat == null) return;
 		if(localMat == null) return;
 
 
-		localMat.tx = hxd.Math.round(localMat.tx);
-		localMat.ty = hxd.Math.round(localMat.ty);
-		localMat.tz = hxd.Math.round(localMat.tz);
+		localMat.tx = hxd.Math.round(localMat.tx * 10) / 10;
+		localMat.ty = hxd.Math.round(localMat.ty * 10) / 10;
+		localMat.tz = hxd.Math.floor(localMat.tz * 10) / 10;
 
 
 		var elts: Array<PrefabElement> = [];
 		var elts: Array<PrefabElement> = [];
 		for(path in paths) {
 		for(path in paths) {