Touch simulation problem

Hi all,

    I have some follow up questions on this topic as I also want to make a System Tester to automate the test flow.

    https://forums.coronalabs.com/topic/69243-is-there-a-way-to-send-a-global-touch-event-at-an-x-and-y-location-and-have-it-touch-whaterver-is-there/

    The conclusion of the discussion is that we may need to create our own propagation now.

    So I have a few questions:

    1) Will Corona release an API to simulate the touch event (Not only dispatchEvent)?

    2) If we need to create our own propagation, how can we handle the displayObject with Mask and isHitTestable?

Raymond

I’ve asked for a raycast API to be included into core which would do this but there is no timeline on it yet.

For the “touch” event, I remember one more thing

Is it possible to change the “Runtime:addEventListener” to be the foremost touch rather than the last touch?

Since it will be useless if it act as last touch.

An easy way of doing that is to have a transparent rect on top of all other objects as that will get the first touch.  You can then decide whether to propagate or block the touch from going any further.

I’ve requested this feature but so far only 5 votes for it, if you could throw some votes towards it that would be great - http://feedback.coronalabs.com/forums/188732-corona-feature-requests-feedback/suggestions/32583772-a-manual-simulatetouch-event

That’s what I’m doing now to mimic the first touch
But this will not be the good method as the “touch layer” may not be at the top if we need to do some complicating scene transition.

BTW, I think the “Runtime” listener should not work like it performs now.

Thanks for making a request on it and just voted :slight_smile:

I’ve asked for a raycast API to be included into core which would do this but there is no timeline on it yet.

For the “touch” event, I remember one more thing

Is it possible to change the “Runtime:addEventListener” to be the foremost touch rather than the last touch?

Since it will be useless if it act as last touch.

An easy way of doing that is to have a transparent rect on top of all other objects as that will get the first touch.  You can then decide whether to propagate or block the touch from going any further.

I’ve requested this feature but so far only 5 votes for it, if you could throw some votes towards it that would be great - http://feedback.coronalabs.com/forums/188732-corona-feature-requests-feedback/suggestions/32583772-a-manual-simulatetouch-event

That’s what I’m doing now to mimic the first touch
But this will not be the good method as the “touch layer” may not be at the top if we need to do some complicating scene transition.

BTW, I think the “Runtime” listener should not work like it performs now.

Thanks for making a request on it and just voted :slight_smile: