Cocos Creator 3.2.1 System Event Touch Move isn't working after click an node

Hi all, I need to get global touch move event even I clicked a node on the scene, but after click the node when I move finger, SystemEvent.EventType.TOUCH_MOVE doesn’t fire.

Do you have a demo?

I will ask engineering to have a look.

Here is the video… I added callback with console for TOUCH_MOVE:

systemEvent.on(SystemEvent.EventType.TOUCH_MOVE, (event) => {
    console.error('SYSTEM TOUCH MOVE');
});

but if I firstly TOUCH_DOWN to the button and move my finger, the System move event doesn’t fire:

I am wondering how can I handle global event every time, even I touched any node.

Hello, your feedback on this issue is not a bug in the engine.
1 Click the button, then hold it down and move out of range of the button is responsive, you need to listen to the events of the node where the button component is mounted (Node.EventType)
2 button component is currently designed not to allow touch events to be passed down (will prevent the bubbling of events, resulting in a touch will not be responded to if there is a node under the hierarchy of the button component’s node)
test

My Test Project
NewProject_35.zip (25.1 KB)

Hi, thanks for replay… But what should I do to handle move event all the times? It is not convenient to check what element I clicked and pass move event by this element. For example in PIXI.js you can handle global move event in all cases.
I know I can use default browser events:

dodument.getElementById('GameCanvas').addEventListener('touchmove', (event: TouchEvent) => {});

But will they work on native platform? And also how to convert TouchEvent location to EventTouch location?

Or can be other solution for global handle touch move? Thanks.

  • ‘document.getElementById’ is the interface to Html and does not work on the native platform.

Can I create top-level node what will handle touch events and provide events to be passed down?

I can understand that your needs are :
When a button is clicked, the event of the button and the event of the node under the button hierarchy can respond at the same time?

Also one thing I didn’t explain clearly above is that if you press the button without releasing it, it won’t respond when you move to another component.
(The reason is: you will only trigger the touch response if you touch it. When you move, you trigger the touch response at the location you initially touched, not the location after you move)
If you need the mouse to respond even after you move, you need to listen for mouse events. However, mouse events are currently only available on the web side, there are no mouse events natively.

NewProject_35.zip (25.5 KB)

you can have a try!

Thanks, I will look, my suggestion is make system events emits every time, as now I just can put event on background sprite, and it will be the same as system events.