From 0ac0c23f15a8a930fdf5c5178652a71ceda9c84a Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Mon, 28 May 2018 12:14:03 +0200 Subject: [PATCH] Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 128 bytes modified --- ff0fsum4zx.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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;