diff --git a/1cs8fm87ty.js b/1cs8fm87ty.js new file mode 100644 index 0000000..6c559ef --- /dev/null +++ b/1cs8fm87ty.js @@ -0,0 +1,28 @@ +//console.log(data); + +this.camera = GameLib.EntityManager.Instance.findComponentById('yv62w8sx9r'); + +var vector = new THREE.Vector3(); + +vector.set( + ( event.clientX / window.innerWidth ) * 2 - 1, + - ( event.clientY / window.innerHeight ) * 2 + 1, + 0.5 ); + +vector.unproject( this.camera.instance ); + +vector.x = -1 * ((window.innerWidth / 2) - (data.event.clientX)); +vector.y = 1 * ((window.innerHeight / 2) - (data.event.clientY)); +vector.z = 0; + +this.camera.lookAt.x = vector.x; +this.camera.lookAt.y = vector.y; +this.camera.lookAt.z = vector.z; + +this.camera.updateInstance(); + +//console.log(vector.x); + +return null; + +//@ sourceURL=mouseMove.js \ No newline at end of file