From 521e4676b060bd47ef8b9cdb17bc88d7a7153a88 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 7 Nov 2017 20:53:09 +0100 Subject: [PATCH] Update: CC - Mouse Move - Moorcow (fsilsam72g.js) 2 bytes modified --- fsilsam72g.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fsilsam72g.js b/fsilsam72g.js index 9cf4503..cc69ef1 100644 --- a/fsilsam72g.js +++ b/fsilsam72g.js @@ -37,7 +37,7 @@ thrower.instance.lookAt( /** * First we find our crosshair */ -var crosshair = GameLib.EntityManager.Instance.findComponentById('oxpg88pgzv'); +//var crosshair = GameLib.EntityManager.Instance.findComponentById('oxpg88pgzv'); var sphere = GameLib.EntityManager.Instance.findComponentById('dpol2u3xbm'); /** @@ -46,9 +46,14 @@ var sphere = GameLib.EntityManager.Instance.findComponentById('dpol2u3xbm'); var target = new THREE.Vector3( (-1 * (window.innerWidth / 2 - data.event.x)) , (window.innerHeight / 2 - data.event.y) , - 0.5 + 0 ); +sphere.instance.position.copy(target);//instance.applyMatrix4( mInverse ); +sphere.position.x = sphere.instance.position.x; +sphere.position.y = sphere.instance.position.y; +sphere.position.z = sphere.instance.position.z; + /** * Now we get the position of the crosshair, in our world scene space */ @@ -100,10 +105,7 @@ if (intersects.length > 0) { * We need the x/y/z position of an imaginary object, at target position, in the game scene */ //var mInverse = new THREE.Matrix4().getInverse( crosshair.instance.matrixWorld ); -sphere.instance.position.copy(target);//instance.applyMatrix4( mInverse ); -sphere.position.x = sphere.instance.position.x; -sphere.position.y = sphere.instance.position.y; -sphere.position.z = sphere.instance.position.z; + //@ sourceURL=mouseMove.js \ No newline at end of file