[SOLVED]1st Test On Google Android Mobile Device: No Touch Input?

JeZxLeeJeZxLee Posts: 67Member
edited July 31 in Programming

Hi,

We managed just now to install our game demo build to our Google Android mobile device.
Everything works except the touch input on the screen?
We handle mouse input on desktop/laptop HTML5 version.
Do we need to do something special for Android devices to get touch input working?
Let us know, thanks!

Current build is live on GitHub below:
https://github.com/FallenAngelSoftware/Godot-SpaceSwap2

Jesse
www.FallenAngelSoftware.com

EDIT #1:
We found below but are confused as to why mouse events are not treated as touch events on mobile?
https://docs.godotengine.org/en/stable/classes/class_inputeventscreentouch.html#inputeventscreentouch

Comments

  • JeZxLeeJeZxLee Posts: 67Member
        if ScreensCore.OperatingSys == ScreensCore.OSAndroid:
            if event is InputEventScreenTouch:
                if event.pressed:
                    MouseButtonLeftPressed = true
                    MouseScreenX = event.position.x
                    MouseScreenY = event.position.y
    

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file