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

Not working with Godot 4.2.1 #37

Closed
devantti opened this issue Jan 20, 2024 · 10 comments
Closed

Not working with Godot 4.2.1 #37

devantti opened this issue Jan 20, 2024 · 10 comments

Comments

@devantti
Copy link

I updated my Gogot engine from 4.1.3 to 4.2.1 and touches stopped to work on mobile. When I downgraded back to 4.1.3 it is working now again.

@Federico-Ciuffardi
Copy link
Owner

I tried https://github.com/Federico-Ciuffardi/GodotTouchInputManager-Demo and https://github.com/Federico-Ciuffardi/GestureControlledCamera2D in version v4.2.1.stable and they seem to work fine.

I suspect the problem is related to the way you use GDTIM in your project. Could you send a minimal reproducible example so I can try to figure out what is wrong?

@devantti
Copy link
Author

I will send it later. Did you tried it on emulator or physical device?

@devantti
Copy link
Author

I wasn't sure how to do it so here you can download a zip file: https://drive.google.com/file/d/1FkkgnIeiHxdENQbS8I2WR8tDzbL0R_Nv/view?usp=sharing.

In Godot 4.2.1 I created a new project from asset library projects (Godot touch input manager demo - Godot 4.x). To get it to emulator I installed android build template from project menu. Then when emulator (Pixel 7 Pro API 33) is running pushed remote debug in editor to get it to emulator. It crashed right after starting so changed stretch mode to viewport and renderer to gl_compatibility/gl_compatibility. When I tried it it didn't register any touch on emulator. Then tried again with Godot 4.1.3 and everything works as expected.

@Federico-Ciuffardi
Copy link
Owner

I tried your project with a physical device and it worked, so maybe the problem is related to the emulator or your specific development environment (OS, Android SDK, etc).

If possible, try with a physical device to verify that the emulator is not the problem.

Another thing you could check is if Godot native touch events (InputEventScreenTouch and InputEventScreenDrag) work on the emulator.

@devantti
Copy link
Author

Interesting... Like I told earlier I have also tried my own project on physical device and there it didn't work. I will try demo on device too when I get home from work.

I was thinking about moving away from your library and just use those events but maybe I should first try them too. :)

@devantti
Copy link
Author

As I suspected it is not working on physical device either. https://drive.google.com/file/d/1-Wc9Jr2w8vipAFWO3wqVAEtSFeSzTR1-/view?usp=drive_link

@devantti
Copy link
Author

devantti commented Jan 25, 2024

I made a simple project from scratch. Touch (InputEventScreenDrag) works on 4.1.3 but not in 4.2.1 on emulator nor device. For some reason on 4.2.1 on emulator and device touch is registered as mouse left and drag as mouse motion regardless is emulate mouse from touch is on or off.

`extends Node2D

@onready var label = $Label

func _input(event: InputEvent):
label.text = event.as_text()
if event is InputEventScreenTouch:
var touch_position = event.position
var label_node = Label.new()
label_node.text = "Touch"
label_node.position = touch_position
add_child(label_node)

elif event is InputEventScreenDrag:
	var touch_position = event.position
	var label_node = Label.new()
	label_node.text = "Drag"
	label_node.position = touch_position
	add_child(label_node)`

Thanks for the help. I should get new mac next week so maybe fresh install will iron out this problem. Thanks for the help!

@Patataonk
Copy link

Patataonk commented Feb 4, 2024

Hi
I have the same issue

downloaded the demo https://github.com/Federico-Ciuffardi/GodotTouchInputManager-Demo
exported as apk and tried on a android phone and it doesnt work

My OS is windows 11

Godot 4.2.1 Stable

Android Studio 2023.1.1.25

JDK 2.1

@devantti
Copy link
Author

devantti commented Feb 20, 2024

FYI: Nope, new mac didn't help. Still same issue on new mac with 4.2.1 Stable. On 4.1.3 it still works on new mac. Concerns both GDTIM and Godot native touch events. Tried also with 4.3-dev3 and it has same problem. I think I will have to open ticket to Godot's repo.

For reference: godotengine/godot#88621

@devantti
Copy link
Author

devantti commented Jun 6, 2024

Problem is fixed in Godot 4.3 beta 1.

@devantti devantti closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants