Hersir Posted November 23, 2018 Share Posted November 23, 2018 Hi, have encountered such issue, I am listening on pointer events observable: scene.onPointerObservable.add(this.onPointer); this method listens to down, up, move events: function onPointer(info: PointerInfo) { if (info.type === PointerEventTypes.POINTERMOVE) { this.handleMove(info.event); } else if (info.type === PointerEventTypes.POINTERUP) { this.handleUp(info.event); } else if (info.type === PointerEventTypes.POINTERDOWN) { this.handleDown(info.event); } } all woks well till on some android devices PointerUp is not triggered, after some investigation found out that event was canceled so PointerCancel was triggered instead of PointerUp, but after digging in the code saw that engine doesn't handle them at all. Anyone had issues with pointer events being canceled ? maybe some solutions ? As it's not trivial to add cancel event handling as on some devices both Cancel and Up is handled at the same time. Thank you for any info. Quote Link to comment Share on other sites More sharing options...
Hersir Posted November 23, 2018 Author Share Posted November 23, 2018 `this._pointerCaptures` have these pointer ids as true Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 23, 2018 Share Posted November 23, 2018 Do you have the same issue in the playground ? Could it be related to pep.js missing on your app ? Quote Link to comment Share on other sites More sharing options...
Hersir Posted November 26, 2018 Author Share Posted November 26, 2018 @Sebavan Hi, I have pep.js as pointer events are working, just on some andorid devices instead of PointerUp, PointerCancel event is called especially if taps are done very quickly Quote Link to comment Share on other sites More sharing options...
Hersir Posted November 26, 2018 Author Share Posted November 26, 2018 But as engine is not listening to them my script gets stuck for ever, as its waiting for up event, for now added `pointercancel` event on app side, and just triggering onPointerUp from scene to force cancel as up, till now works well but in long term could get in some issues where valid cancel event will be executed as up Sebavan 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.