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

Disable viewports inputs when dragging and dropping into the viewport #91845

Conversation

ryevdokimov
Copy link
Contributor

@ryevdokimov ryevdokimov commented May 11, 2024

Fixes: #90112 and this comment #90112 (comment)

Having viewport inputs enabled while performing a drag and drop leads to issues especially in different navigation modes as mentioned in the linked issue. In theory the existing behavior sounds good, but in practice I believe it leads to more issues than it's worth. Usually, users put the target location in their viewport before dragging to it.

@ryevdokimov ryevdokimov requested a review from a team as a code owner May 11, 2024 17:53
@Chaosus Chaosus added this to the 4.3 milestone May 11, 2024
@akien-mga akien-mga requested a review from Calinou May 11, 2024 19:16
@ryevdokimov ryevdokimov force-pushed the disable-freelook-when-drag-and-drop branch from 29cf705 to ec070f2 Compare May 11, 2024 19:36
@ryevdokimov ryevdokimov marked this pull request as draft May 12, 2024 12:00
@ryevdokimov
Copy link
Contributor Author

ryevdokimov commented May 12, 2024

Just realized I haven't actually solved the problem, and it's a little bit more complex. Might have to look into disabling all input on the viewport before the data has even entered. I think this is more of an "input" problem, than simply not allowing certain functions depending on the drop data.

Edit: Yeah, I think that is probably the way to go, but correct me if I'm wrong.

@ryevdokimov ryevdokimov force-pushed the disable-freelook-when-drag-and-drop branch 2 times, most recently from a749522 to 8342eb4 Compare May 12, 2024 12:49
@ryevdokimov ryevdokimov marked this pull request as ready for review May 12, 2024 12:50
@ryevdokimov ryevdokimov changed the title Disable freelook when dragging and dropping into the viewport Disable viewports inputs when dragging and dropping into the viewport May 12, 2024
@ryevdokimov ryevdokimov force-pushed the disable-freelook-when-drag-and-drop branch from 8342eb4 to 824d21b Compare May 12, 2024 14:05
akien-mga
akien-mga previously approved these changes May 29, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

Edit: Not sure actually. I don't have a lot of hands on experience with 3D but it seems useful to me to be able to navigate the scene while dragging something to instantiate at a specific place. Sometimes the target is just a little bit off the current viewport, or zooming is needed to position things precisely, etc.

@akien-mga akien-mga dismissed their stale review May 29, 2024 21:14

Actually, I'm not sure.

@ryevdokimov
Copy link
Contributor Author

ryevdokimov commented May 29, 2024

There is a precedent in other engines that handle this similarly to this PR. Like I said being able to navigate while you're dragging sounds good in theory, but now you're overlapping many functionalities that cause conflicts, even if it could work and we could find a way to separate it all out I think pressing that many button at once is kind of janky.

You already can't freelook/navigate in the viewport because of a few of these conflicts that exist in master. I think the workflow of finding your target first then dragging is pretty ingrained in most people that work with 3D a lot.

@KoBeWi
Copy link
Member

KoBeWi commented Jun 18, 2024

it seems useful to me to be able to navigate the scene while dragging something to instantiate at a specific place

What are the options to navigate the scene though? Holding Alt rotates the camera, but only if you use non-Godot navigation scheme. I think most people use the default, which doesn't allow navigating while dragging (unless I'm missing some shortcut).

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Alright, let's go with this approach and see if anyone complains their workflow broke.

@akien-mga akien-mga merged commit 4949e96 into godotengine:master Jun 19, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@ryevdokimov ryevdokimov deleted the disable-freelook-when-drag-and-drop branch June 19, 2024 12:43
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.

Alt key conflict between scene drag and drop and 3D navigation scheme
4 participants