want to move a player on a canvaas, currently doing with arrow keys but id like to do it with the mouse
u can use vanilla js, try look for node.addEventListener(eventname) eventname can be any of these mousemove, mouseup, mousedown, mouseover
canvas.addEventListener('pointermove', ({clientX, clientY}) => { ... });
Обсуждают сегодня