Przeglądaj źródła

优化图片视频旋转缩放控制

蓝色星空 1 rok temu
rodzic
commit
5b561ea3f1

+ 2 - 2
Assets/SDK/Modules/Module_Interaction/BoundingBox/Scripts/BoundingBoxRoot/BoundingBoxRoot/CornerBoundingBoxRoot.cs

@@ -296,7 +296,7 @@ public class CornerBoundingBoxRoot : AbstractBoundingBoxRoot
             handles[i].root.transform.parent = boundingBoxContainer;
             handles[i].root.transform.localPosition = handles[i].localPosition;
             handles[i].root.transform.localRotation = Quaternion.identity;
-
+            handles[i].root.transform.localScale = new Vector3(2,2,1);
             handles[i].visualsScale = new GameObject("visualsScale").transform;
             handles[i].visualsScale.transform.parent = handles[i].root.transform;
             handles[i].visualsScale.transform.localPosition = Vector3.zero;
@@ -338,7 +338,7 @@ public class CornerBoundingBoxRoot : AbstractBoundingBoxRoot
             {
                 handles[i].visualsScale.transform.localEulerAngles = new Vector3(0, 0, 0);
             }
-            handles[i].visualsScale.transform.localScale = new Vector3(3, 3, 3);
+            handles[i].visualsScale.transform.localScale = new Vector3(1, 1, 1);
 
             GameObject prefabToInstantiate = (this.boundingBox.FlattenAxis != BoundingBox.FlattenModeType.DoNotFlatten) ? this.boundingBox.CornerSlatePrefab : this.boundingBox.CornerPrefab;
             if (prefabToInstantiate == null)

+ 1 - 0
Assets/SDK/Modules/Module_Interaction/BoundingBox/Scripts/BoundingBoxRoot/BoundingBoxRoot/SideBoundingBoxRoot.cs

@@ -390,6 +390,7 @@ public class SideBoundingBoxRoot : AbstractBoundingBoxRoot
 
             BoxCollider collider = handles[i].root.gameObject.AddComponent<BoxCollider>();
             collider.size = Vector3.one * Mathf.Max(Mathf.Max(bounds.size.x, bounds.size.y), bounds.size.z) * 2f;
+            collider.size = new Vector3(collider.size.x*2, collider.size.y * 2, collider.size.z);
             collider.center = Vector3.zero;// bounds.center;
 
             handles[i].root.gameObject.AddComponent<NearInterationGrabbable>();