Online topdown shooter, with inventory system (think warcraft 3) where you can drop items in the floor (3D gameworld)
Describe the problem or limitation you are having in your project
I am using https://github.com/peter-kish/gloot as my inventory system.
Dragging items is done in "The Godot Way" by using the 3 following existing functions:
I can detect if the mouse left click which drags, is no longer pressed, by extending the last 2 functions. Hence, the item is succesfully dropped off the inventory, its memory freed, and a corresponding DroppedItem3D is created in the 3D world.
The problem is the following. Left click is for activating the item. So I would like to make right click start dragging, instead of left click. Just like RTS games like warcraft 3.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
On Project Settings, there should be a dropdown of inputs which trigger the Control dragging functions.
For a starting PR, should be a boolean choice for right click. And hence a new parameter is added as a boolean in the core.
But in the future, any input from the input map should be allowed. So that parameter becomes an input instead of a boolean.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
idk where exactly the code is where it checks for the hardcoded left click, and triggers get_drag_data but I used grep to find all the instances, hope it helps:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Currently, I have found no way, only seen the following hack which I haven't tried:
Detect the InputEventMouse and once right click is detected, create a duplicate InputEventMouse and then changes its right click to left click, and insert it into the input event bus. Then delete the original InputEventMouse. This such a hack, its just a bloated solution.
Is there a reason why this should be core and not an add-on in the asset library?
This is a missing feature which should be from the start. Why is left-click hardcoded?
Describe the project you are working on
Online topdown shooter, with inventory system (think warcraft 3) where you can drop items in the floor (3D gameworld)
Describe the problem or limitation you are having in your project
I am using https://github.com/peter-kish/gloot as my inventory system. Dragging items is done in "The Godot Way" by using the 3 following existing functions:
I can detect if the mouse left click which drags, is no longer pressed, by extending the last 2 functions. Hence, the item is succesfully dropped off the inventory, its memory freed, and a corresponding
DroppedItem3D
is created in the 3D world.The problem is the following. Left click is for activating the item. So I would like to make right click start dragging, instead of left click. Just like RTS games like warcraft 3.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
On Project Settings, there should be a dropdown of inputs which trigger the
Control
dragging functions. For a starting PR, should be a boolean choice for right click. And hence a new parameter is added as a boolean in the core. But in the future, any input from the input map should be allowed. So that parameter becomes an input instead of a boolean.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
idk where exactly the code is where it checks for the hardcoded left click, and triggers
get_drag_data
but I usedgrep
to find all the instances, hope it helps:If this enhancement will not be used often, can it be worked around with a few lines of script?
Currently, I have found no way, only seen the following hack which I haven't tried: Detect the
InputEventMouse
and once right click is detected, create a duplicateInputEventMouse
and then changes its right click to left click, and insert it into the input event bus. Then delete the originalInputEventMouse
. This such a hack, its just a bloated solution.Is there a reason why this should be core and not an add-on in the asset library?
This is a missing feature which should be from the start. Why is left-click hardcoded?