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

Add rotation widget to 3D viewport #33098

Merged
merged 1 commit into from Mar 17, 2020
Merged

Conversation

JFonS
Copy link
Contributor

@JFonS JFonS commented Oct 26, 2019

Video demo: https://streamable.com/p4sw4

I think this is feature complete now so I removed the draft status. It now handles the overlap with the FPS label properly, there is an option to enable/disable the "auto orthogonal" behavior and an editor setting to hide/show the viewport rotation gizmo.

Any feedback can go in the godot-proposals repo: godotengine/godot-proposals#185

Bugsquad edit: This closes #11094.
Now fixes #26728 too.

@MarcusElg
Copy link
Contributor

It looks a bit flat imo, not really sure what to do about it though

@Calinou
Copy link
Member

Calinou commented Oct 27, 2019

@MCrafterzz It seems the far-away axes are already darkened, maybe this effect could be made stronger? We could also play with their opacity, in addition to the brightness.

@MarcusElg
Copy link
Contributor

Maybe a slight border around the circles and the background one as well? Worth trying

@Zylann
Copy link
Contributor

Zylann commented Oct 29, 2019

What happened to the FPS info? It used to sit in the same spot.
image

@JFonS
Copy link
Contributor Author

JFonS commented Oct 29, 2019

@Zylann I didn't know the FPS info was located there, so I probably just slapped the new widget on top. I will find a fix for that on the final PR.

GDCLASS(ViewportRotationControl, Control);

struct Axis2D {
Vector2 screen_point{ 0, 0 };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line causes some error during the CI build. The Vector2 constructor is not marked as noexcept and that trips the compiler somehow. Adding the noexcept keyword to the Vector2 constructor fixes the build, but I'm not sure it's the right fix or if I'm just using list-initializers wrongly.

@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Dec 13, 2019
@JFonS JFonS changed the base branch from master to 3.2 March 8, 2020 23:30
@JFonS
Copy link
Contributor Author

JFonS commented Mar 8, 2020

Sorry for the review request spam, I forgot to change the target branch to 3.2 before pushing the rebased changes...

@JFonS JFonS removed the request for review from a team March 8, 2020 23:33
@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Mar 9, 2020
@akien-mga akien-mga modified the milestones: 4.0, 3.2 Mar 9, 2020
@akien-mga akien-mga merged commit 69081c0 into godotengine:3.2 Mar 17, 2020
@akien-mga
Copy link
Member

Thanks!

@JFonS JFonS deleted the viewport_rotation branch May 4, 2021 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

orthogonal left view and right view sometimes not aligned properly Axis caption in spatial editor
6 participants