-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Several improvements to GridMap. #12488
Conversation
@@ -54,8 +56,18 @@ void GridMapEditor::_configure() { | |||
|
|||
void GridMapEditor::_menu_option(int p_option) { | |||
|
|||
bool using_freelook = Input::get_singleton()->is_mouse_button_pressed(BUTTON_RIGHT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a way to know that without hardcoding an input check? @Zylann is about to add support for toggling freelook with a hotkey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that you shouldn't imply RMB means freelook, that could also mean there is a design issue to solve before that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes thats why i added the flag, its true, that freelook mode could be toggled in different ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means we would need to change Gridmap if freelook changes... which isn't good design (not DRY and no SoC), especially because the toggle mode I'm adding would not be implementable with such flag in Gridmap, unless Gridmap also captures the involved shortcut...
Currently the only true way to access this info is with SpatialEditorViewport::is_freelook_active()
though...
Isn't it possible to handle this by making the proper plugins consume events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zylann that flag is only used to avoid rotation of tiles, if frelook, or any other shortcut / mode, changes grid map and other stuff will need to change (that flag might even be irrelevant on such cases), because of the possible conflicts, so this is not about design, godot works this way, maybe later we could have a better input handling mechanism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that when I say "consume events", Godot already supports this. If using that feature isn't enough then I don't know... but like @akien-mga says it will fail as soon as I PR the feature proposed in #10463 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zylann also consider that such navigation mode, will make grid map editing almost unusable, or very hard at least (it will also override QWER keys for spatial gizmos), but yeah, im not sure how people will use it, also im not sure how to fix that in a smarter way, i mean there will be something here that requires knowledge of the general viewport shortcuts.
Some questions:
|
any hopes of fixing this before the beta? |
@reduz im a bit lost, i cant figure out a way to capture the events produced by spatial editor so they dont propagate to the gridmap shortcuts or input events, thats the only thing im missing here. |
it's the opposite, you have to allow the events that go to gridmap editor
to continue to spatial editor by returning false instead of true
…On Mon, Nov 6, 2017 at 3:58 PM, Daniel Ramirez ***@***.***> wrote:
@reduz <https://github.com/reduz> im a bit lost, i cant figure out a way
to capture the events produced by spatial editor so they dont propagate to
the gridmap shortcuts or input events, thats the only thing im missing here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12488 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z22vLJ8mXjrn5lJTZQCJkKAbb4KXcks5sz1btgaJpZM4QKdxs>
.
|
933fec6
to
eea1e87
Compare
i updated this to consider when freelook is active. |
Fixed crash when undoing. More ergonomic shortcuts. Fixed freelook navigation.
eea1e87
to
1b7f99d
Compare
closes #10697
also changed the appearance of the editor:
,
of course thats up for discussion, but i think the change makes more sense, and should be also implemented in tilemap.