touchscreen is now in 45% quadrants and not the window diagonals
This commit is contained in:
parent
352c3aa16d
commit
93ba24a53a
1 changed files with 2 additions and 2 deletions
|
@ -109,8 +109,8 @@
|
||||||
|
|
||||||
const handleTouch=e => {
|
const handleTouch=e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let x=e.touches[0].clientX/window.innerWidth-.5;
|
let x=e.touches[0].clientX-window.innerWidth/2;
|
||||||
let y=e.touches[0].clientY/window.innerHeight-.5;
|
let y=e.touches[0].clientY-window.innerHeight/2;
|
||||||
const angle=((Math.atan2(x, y)+2*Math.PI)%(2*Math.PI))/Math.PI;
|
const angle=((Math.atan2(x, y)+2*Math.PI)%(2*Math.PI))/Math.PI;
|
||||||
|
|
||||||
let inputs=currentInputs;
|
let inputs=currentInputs;
|
||||||
|
|
Loading…
Reference in a new issue