File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Assets/MRTK/SDK/Features/UX/Scripts/BoundsControl Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1250,15 +1250,16 @@ private void TransformTarget(HandleType transformType)
1250
1250
// If non-uniform scaling or uniform scaling only on the non-flattened axes
1251
1251
if ( ScaleHandlesConfig . ScaleBehavior != HandleScaleMode . Uniform || ! UniformScaleOnFlattenedAxis )
1252
1252
{
1253
- if ( ActualFlattenAxis == FlattenModeType . FlattenX )
1253
+ var currentActualFlattenAxis = ActualFlattenAxis ; // Calculate flatten axis once
1254
+ if ( currentActualFlattenAxis == FlattenModeType . FlattenX )
1254
1255
{
1255
1256
scaleFactor . x = 1 ;
1256
1257
}
1257
- if ( ActualFlattenAxis == FlattenModeType . FlattenY )
1258
+ if ( currentActualFlattenAxis == FlattenModeType . FlattenY )
1258
1259
{
1259
1260
scaleFactor . y = 1 ;
1260
1261
}
1261
- if ( ActualFlattenAxis == FlattenModeType . FlattenZ )
1262
+ if ( currentActualFlattenAxis == FlattenModeType . FlattenZ )
1262
1263
{
1263
1264
scaleFactor . z = 1 ;
1264
1265
}
You can’t perform that action at this time.
0 commit comments