Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransformControls: Improve gizmo rendering with orthographic cameras. #24242

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jun 16, 2022

Fixed #24208.

Description

This PR implements the suggestion of #24208 (comment) to mitigate the issue of disappearing gizmos when using TransformControls with orthographic cameras.

@WestLangley WestLangley added this to the r142 milestone Jun 16, 2022
@mrdoob mrdoob merged commit 0877231 into mrdoob:dev Jun 17, 2022
@mrdoob
Copy link
Owner

mrdoob commented Jun 17, 2022

Thanks!

@deethee
Copy link

deethee commented Jun 29, 2022

Hi this fix did fix the problem of the gizmo disappearing but it creates a new problem with transformCotrols and rotation. This is nolonger possible!.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jun 29, 2022

Do you mind explaining in more detail what's going wrong?

@deethee
Copy link

deethee commented Jun 29, 2022

Well if you have a orthographic camera and you want to use the Z rotation of the transformControls (hide the other axis) than you cannot rotate the object anymore, nothing happens. Without the fix you are able to rotate it. If you do not hide the other axis you are somehow able to use the "wrong" rotation axis to rotate that object. For me it feels that the pivot is than somehow wrong aligned.

@mrdoob
Copy link
Owner

mrdoob commented Jun 30, 2022

@deethee could you share a screen recording?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jun 30, 2022

I've tried to reproduce the issue for quite a while now but without success. A video would be indeed helpful.

@deethee
Copy link

deethee commented Jul 5, 2022

Without the bugfix I can rotate the triangle by the z axis. The other axis are hidden:
image

With the bugfix I can drag the rotation handle but nothing happens: (so, I am not sure if nothing happens or if it is rotating the wrong axis)
image

This is orthographic camera only.
If I show all axis I can rotate the triangle by the yellow rotation handle not the blue. This is with the patch:
image

By the way, as you see the color schemes are bad you hardly see the handles.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 5, 2022

Strange, the gizmos look completely different compared to the current version. Are you using an older version of TransformControls?

@deethee
Copy link

deethee commented Jul 5, 2022

Yes I use R124, but the initial bug was in master too.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 5, 2022

I'm afraid we can't ensure that patches also work with previous versions of the library. If you want this issue fixed, you have to upgrade to r142.

@deethee
Copy link

deethee commented Jul 5, 2022

Does that mean you don't have this rotation issue with the r142 and the fix applied?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 5, 2022

No, was not able to reproduce the issue so far.

@deethee
Copy link

deethee commented Jul 6, 2022

Hi, I just updated to latest Three release and the problem does remain. Without the patch the rotation does work.
http://jsfiddle.net/3dyzhv9e/

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 6, 2022

It does not seem to work with r124, too: http://jsfiddle.net/k2c6Lj7b/3/ 🤔

@deethee
Copy link

deethee commented Jul 12, 2022

Does not work with actual version 142 also: http://jsfiddle.net/vb6t4zx5/

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 12, 2022

In any event you are not reporting a regression. It's seems to be an issue that always existed in TransformControls, no?

@deethee
Copy link

deethee commented Jul 13, 2022

No this bug has been introduced with the upper bugfix #24208 . The bugfix fixed errors with the transformControls Gizmos disappearing and the drag event being interrupted. This problems were fixed but now the z-rotation is no longer possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TransformControls translate 2D pane gets invisible near canvas Border
4 participants