Closed dave2 closed 1 year ago
Added initial changes to this branch on my fork: https://github.com/dave2/GodotTouchInputManager/tree/godot-4.0-support
Hello David, thank you for your interest in the project!
I created a new godot4support
branch, feel free to make a PR when you're done.
Hey @Federico-Ciuffardi , the godot4support
branch seems to be exactly inline with master
, and doesn't contain Dave's changes above. But I opened a PR branched off of Dave's changes & targeting the godot4support
branch: https://github.com/Federico-Ciuffardi/GodotTouchInputManager/pull/28
It just occurred to me that one reason it would be nice if/when we can get it merged directly into the engine instead of these being custom events on the GDScript side is that: events triggered through Input.parse_input_event(val)
won't process collision queries. Like if I have an Area2D that's pickable, the custom event doesn't reach there:
$Area2D.input_pickable = true
$Area2D.connect("input_event",
func (_viewport, event, _shape_idx):
if event is InputEventSingleScreenTap:
print(event)
)
I don't know if there's a way to fix that, might just need to be a caveat we document
There is an issue about this (#16), at the moment the solution is to manually check for collisions between shapes and events, maybe we should add a FAQ section in the README and include this there. If you want to try it, feel free to do a PR.
Godot 4 is supported after the merge of PR #28!
I'm playing around with the current alpha of Godot 4 (4.0-alpha14), and there's quite a few changes which need to be made for at least importing properly.
I can provide a patch but it would probably need a new major version or branch because the changes are not backwards compatible.