File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Assets/MediaPipeUnity/Samples/UI/Scripts Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ private void LateUpdate()
5454 var center = rect . center ;
5555 var topLeftRel = new Vector2 ( rect . xMin - center . x , rect . yMin - center . y ) ;
5656 var topRightRel = new Vector2 ( rect . xMax - center . x , rect . yMin - center . y ) ;
57- var rotatedTopLeftRel = rectTransform . rotation * topLeftRel ;
58- var rotatedTopRightRel = rectTransform . rotation * topRightRel ;
57+ var rotatedTopLeftRel = rectTransform . localRotation * topLeftRel ;
58+ var rotatedTopRightRel = rectTransform . localRotation * topRightRel ;
5959 var wMax = Mathf . Max ( Mathf . Abs ( rotatedTopLeftRel . x ) , Mathf . Abs ( rotatedTopRightRel . x ) ) ;
6060 var hMax = Mathf . Max ( Mathf . Abs ( rotatedTopLeftRel . y ) , Mathf . Abs ( rotatedTopRightRel . y ) ) ;
6161 return ( 2 * wMax , 2 * hMax ) ;
You can’t perform that action at this time.
0 commit comments