Raycast threejs touch event not working

I’ve been working on threejs mouse raycast with fabricjs, and it is working now here but the problem is the object didn’t move if i was using smartphone which is using touch. Should i create another event listener for touch event? or should it be working just fine using mouse event?

Pls help

Yes, mousedown only works with mouse inputs, if you want to capture the touch events from mobile you need touchstart, touchmove and touchend.

If you don’t want to add these, you can use pointerdown, pointermove and pointerup which capture both.

ok i’ll try it, but should i change new MouseEvent to new PointerEvent ?

https://codepen.io/naonvl/pen/ExbjejL it didn’t work, i dont know why but u’re right pointer should capture touch and mouse, could u pls give me an example?

I took a look at the codepen but I honestly have no idea why it doesn’t work. Maybe it has something to do with fabric.js? It’s very odd because just by logging the results, the two events seem to contain the same information. :thinking:

right? i implemented pointer event here 3D-TShirt-Design but it didn’t work since fabricjs didn’t support pointer event i believe

owayo football jerseys custom made in our 3D Designer - Football jersey designer - Printed football jerseys this is the reference for my project, i’ve inspect the js files, and it is using pointerdown do u think i should create a custom handler for that? pointer event still not working on fabricjs as i think