Universal Scalar Update Rotation Flag Resulting Reverse Behavior

Hi all, I am new to the forum, I am seeing an bug when setting UpdateGizmoRotationToAttachedMesh to true for universal scalar.

When setting the below property to true. The Uniform scalar behaves in the opposite manner after rotating 90 degrees.

gizmoManager.gizmos.scaleGizmo.uniformScaleGizmo.updateGizmoRotationToMatchAttachedMesh = true;

Steps to recreate:

Uniform scalar bug repro

  • load scene,
  • rotate any mesh 90 degrees,
  • press “r” to load the scaling tool,
  • drag the uniform scalar up to increase the scale of the object.
  • You will notice that the scale decreases instead of increases.

Expectation:
Regardless of the rotation of the universal scalar, dragging “up” will increase the scale, dragging “absolute down” will decrease the scale of the mesh.

Babylon Version 4.1

Could you try on our latest preview version ? I think it has been fixed.

cc @Cedric FYI

Yes, I think it’s fixed.
I’ve tested with version 4.2.0-beta.5 and could not reproduce.

1 Like

@Cedric @sebavan

I am able to reproduce the issue in 4.2.0-beta.5 using the steps above

Here is the link:

Here are the steps:

  • load scene,
  • rotate any mesh 90 degrees,
  • press “r” to load the scaling tool,
  • drag the uniform scalar up to increase the scale of the object.
  • You will notice that the scale decreases instead of increases.

Ok, I get it. I was rotating the mesh on the Y axis. :slight_smile:

The uniform scale is performed by draging on the Y axis. If it’s upside down, then you have to move the mouse in the opposite way.
It works the same with other axis.

Yes, I can confirm that is the current behavior, but is it the desired behavior?
From a usability perspective it gets confusing having to drag the gizmo in the Y relative to the mesh. Instead of the absolute Y.

This is the behavior in Unity and other 3D engines as well.

Let me check if I can do something :slight_smile:

Awesome!! :sunglasses:

Can you test the gizmos from this thread Unity Inspired Gizmo Meshes
I think it will fix your issue so I won’t have to do it :slight_smile:

Hahaha, sure I think the person creating that PR can resolve this Uniform Scalar issue :slight_smile: