Fixed broken controller.
This commit is contained in:
parent
43c1c1c064
commit
62364b219b
@ -15,7 +15,7 @@ document.onmouseup = function(e) {
|
|||||||
};
|
};
|
||||||
document.ontouchend = function(e) {
|
document.ontouchend = function(e) {
|
||||||
document.getElementById("slingshot").classList.add("ungrabbed");
|
document.getElementById("slingshot").classList.add("ungrabbed");
|
||||||
sendNudge(-Math.floor(e.touches[0].clientX - window.innerWidth / 2), Math.floor(e.touches[0].clientY - (window.innerHeight / 2)));
|
sendNudge(-Math.floor(e.changedTouches[0].clientX - window.innerWidth / 2), Math.floor(e.changedTouches[0].clientY - (window.innerHeight / 2)));
|
||||||
};
|
};
|
||||||
document.ontouchstart = function(e) {
|
document.ontouchstart = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user