InputEventMouseMotion is being indefinitely generated when a drag ends on top of a PhysiscsBody2d that has the input_event() signal connected
Created by: vandalk
Godot version: Godot 3.1 beta 8 official
OS/device including version: Android (Asus Zenfone m1?)
Steps to reproduce:
1.Open the MRP and run it from the editor in a android phone.
2.Start Draging your finger from anywhere on the screen to any Godot Icon and release your finger on top of it.
3. Touch anywhere on the screen except the monster to see it create a line by detecting a input drag that shoudn't exist or just watch the ouput from Godot Editor, there will be endless prints of a InputEventMouseMotion with relative (0,0) and speed (0,0)
4. I put a commented line of code on the script on the RigidBody's _on_RigidBody2d_input_event()
that checks if it's an MouseMotion with no relative and get's out, "fixing" the issue for our game, but the InputEvents keep being generated and being processed even though there's no real input.
Issue description:
On the game we are making we have some monsters that are RigidBodies that we can drag over and connect them. To check that, the Monster Scene connects the input_event(viewport, event, shape_idx)
signal connected to itself, and there it checks if it's a InputEventMouseButton on top of the monster, or a InputEventMouseMotion.
On Android, if you just touch any monster everything works fine, if you drag from anywhere, and release your finger on top of any monster, and then touch anywhere on the screen outside the monsters, it will try to draw a connection to where you're touching, as it you were dragging from the monster to that point. You can touch multiple times in different places of the screen and it will keep doing that.
While this is happening If you touch anywhere and drag in any direction releasing your finger outside the monsters, or if you touch any monster and drag and release outside of the monsters, this stops happening.
If you take a closer look at the output you'll see that whenever you release a InputEventMouseMotion on top of a monster, it will print a MouseMotion event indefinitely.
When I try this on 3.0.6 it woks fine, there's no inifnite MouseMotion, this only happens on 3.1 beta. I'm sending the MRP in both a 3.0 and 3.1 version for comparison.
Minimal reproduction project: android_mousemotion_emulation.zip android_mousemotion_emulation3.1.zip