diff --git a/ff0fsum4zx.js b/ff0fsum4zx.js index 5dd7cfd..febbc3d 100644 --- a/ff0fsum4zx.js +++ b/ff0fsum4zx.js @@ -79,6 +79,8 @@ this.ballY = this.football.instance.geometry.boundingSphere.radius / 2; this.activeBall = null; +this.invertMouse = true; + if (this.debug) { this.arrowHelper = new THREE.ArrowHelper( new THREE.Vector3(0,0,-1), @@ -305,9 +307,22 @@ R3.CustomCode.prototype.render = function(delta) { R3.CustomCode.prototype.move = function(data) { var x = data.x || 0; - var y = data.y || 0; - x *= 0.0025; + + var y = 0; + + if (data && data.y) { + + if (this.invertMouse) { + y = data.y; + } else { + y = -data.y; + } + + } + + x *= 0.0025; y *= 0.0075; + this.playerRotation.x += x; this.playerRotation.y += y;