Update: CC - Mouse Move - Moorcow (fsilsam72g.js) 475 bytes modified
parent
9b21545e79
commit
a60ec652a8
|
@ -2,28 +2,8 @@
|
||||||
|
|
||||||
var camera = GameLib.EntityManager.Instance.findComponentById('knwkksjc7n');
|
var camera = GameLib.EntityManager.Instance.findComponentById('knwkksjc7n');
|
||||||
|
|
||||||
camera.lookAt.x = (data.event.x * 0.01) - 0.5;//(window.clientWidth/ 2) + data.event.x;
|
camera.lookAt.x = (-1 * (window.innerWidth / 2 - data.event.x)) * 0.025;//(window.clientWidth/ 2) + data.event.x;
|
||||||
camera.lookAt.y = data.event.y * 0.01;
|
camera.lookAt.y = ((window.innerHeight / 2 - data.event.y)) * 0.025;
|
||||||
|
|
||||||
//if (camera.lookAt.x < -0.5) {
|
|
||||||
// camera.lookAt.x = -0.5;
|
|
||||||
//}
|
|
||||||
//var vector = new THREE.Vector3();
|
|
||||||
|
|
||||||
//vector.set(
|
|
||||||
// ( data.event.clientX / window.innerWidth ) * 2 - 1,
|
|
||||||
// - ( data.event.clientY / window.innerHeight ) * 2 + 1,
|
|
||||||
// 0.5 );
|
|
||||||
|
|
||||||
//vector.unproject( camera.instance );
|
|
||||||
|
|
||||||
//vector.x = -1 * ((window.innerWidth / 2) - (data.event.clientX));
|
|
||||||
//vector.y = 1 * ((window.innerHeight / 2) - (data.event.clientY));
|
|
||||||
//vector.z = 0;
|
|
||||||
|
|
||||||
//camera.lookAt.x = vector.x;
|
|
||||||
//camera.lookAt.y = vector.y;
|
|
||||||
//camera.lookAt.z = vector.z;
|
|
||||||
|
|
||||||
camera.updateInstance();
|
camera.updateInstance();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue