Raycaster.prototype.onMouseDown = function (e) {
if (e.button === pc.MOUSEBUTTON_LEFT) {
this.released = true;
}
};
It’s firing on my touch device once I click the screen, also while using desktop - left click.
so my question is, can i leave it as it is and would it work with all touch devices? Or should i add ontouchend ?
Thanks for this, but I’m just asking if i could entirely rely based on just onMouseDown, since the mobile devices I’ve tested all is firing, wonder whats the compability on global scope
You only showed the callback. Without knowing what you subscribed it to, it is hard to say. Generally, PlayCanvas just passes the browser events, so if browser doesn’t give an event, PlayCanvas won’t know about it.