EVENT_TOUCHEND and EVENT_MOUSEUP difference

I noticed that MouseUp will give you the coordinate of the release, but TouchEnd doesn’t.
I understand the info comes from different places, but what is the correct way to figure out where a Touch was released?

inside of my TouchEnd handler, touches.length is zero (given you don’t have any other touches). Is there another way to access the coordinates/ or should I log them manually through the move commands?

this returns 0:

TouchListener.prototype.onTouchEnd = function (event) { 
console.log(event.touches.length);
};

Look at touchEvent.changedTouches https://developer.playcanvas.com/en/api/pc.TouchEvent.html#changedTouches

1 Like