Update: CC - Touch Move (c55930et90.js) 133 bytes modified

beta.r3js.org
-=yb4f310 2017-11-18 14:08:33 +01:00
parent ab2eebf8c0
commit e53648c594
1 changed files with 8 additions and 2 deletions

View File

@ -7,14 +7,20 @@ if (!this.initialized) {
this.x = window.innerWidth / 2;
this.y = window.innerHeight / 2;
var sensitivity = 0.1;
this.initialized = true;
}
touch.left *= sensitivity;
touch.right *= sensitivity;
touch.up *= sensitivity;
touch.down *= sensitivity;
this.x -= touch.left;
this.x += touch.right;
this.y += touch.down;
this.y -= touch.up;
this.y += touch.down;
if (this.x < 0) {
this.x = 0;