Update: CC - Entity Loaded - AR Football 3 (ff0fsum4zx.js) 128 bytes modified

beta.r3js.org
Theunis Johannes Botha 2018-05-28 12:14:03 +02:00
parent da3306e7c1
commit 0ac0c23f15
1 changed files with 17 additions and 2 deletions

View File

@ -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;