Is this a touch bug, or am I going insane?
I've encountered some seriously weird behaviour related to touch values when an alert pops up.
Essentially what happens is this: If you're constraining a value to touch 1.x, and an alert pops up, the touch will cease to be registered. Not only that, touch 1.x (and y, for all touches) will be set to 0. This means if you're holding downing down touch when the alert pops up, after dismissing it any actor or value you have constrained to touch 1.x will now be using the value 0.
The problem is demonstrated in this project. To experience the bug(?), repeat the following steps:
- Press play.
- Touch the screen and, if the mood takes you, move your finger about. The actor will be constrained to your touch position.
- Keep touching the screen.
- Wait for the GC popup to appear. If you're using Viewer, this will be the standard GC popup message.
- The actor will vanish. (Moved to the far left)
The expected behaviour would be for the actor to remain in the position of the last touch, just like if you touch the screen and release it.
Now, it makes vague sense that GS might have chosen to reset touch entirely when an alert pops up. But it gets weirder.
If your constraint is in a rule that says something like "when touch 1.active is true" or "when touch 1.x > 0", it will jump inside that rule to apply the new value of 0. So even if you're saying to only do the constraint if the value is not 0, it will still apply 0 to the constraint. This is demonstrated in the disabled rule in the project. To test this part of the bug out, disable the lone constraint and enable the rule with the constraint inside it.
So my question is two-fold.
Firstly, is this as crazy a bug as it seems?
Secondly, how on earth can I avoid it?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Comments
Also worth noting that this only occurs on device, either ad hoc or viewer, not in the creator's preview mode.
Edit: Also, can be prevented with the use of an every 0s timer, but that's a very unappealing fix. Attached is my best attempt, but I'm done for the night working on this now.
Edit 2: Submitted a bug report, though it seems I'm the only one interesting in this or who has encountered this rather nasty problem
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Any information on this? Your fix doesn't work on a device in most situations...
A touch related bug seems like a pretty big deal... I mean I make mobile games, has no one else experienced this??
This is a known issue please see the bug in our database for more info