diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 8556b35..638c034 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -79,7 +79,9 @@ this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; this.activeBall = null; -this.invertMouse = false; +this.invertY = false; + +this.invertX = false; if (this.debug) { this.arrowHelper = new THREE.ArrowHelper( @@ -306,13 +308,21 @@ R3.CustomCode.prototype.render = function(delta) { R3.CustomCode.prototype.move = function(data) { - var x = data.x || 0; - + var x = 0; + + if (data && data.x) { + if (this.invertX) { + x = data.x; + } else { + x = -data.x; + } + } + var y = 0; if (data && data.y) { - if (this.invertMouse) { + if (this.invertY) { y = data.y; } else { y = -data.y;