Update: CC - Mouse Down (yfdl3odo4j.js) 373 bytes modified
parent
872d330694
commit
fa991b2c89
|
@ -1,10 +1,28 @@
|
|||
/**
|
||||
* First we find our crosshair
|
||||
*/
|
||||
var crosshair = GameLib.EntityManager.Instance.findComponentById('oxpg88pgzv');
|
||||
|
||||
/**
|
||||
* Target, is the x / y postion of the crosshair on the z=0 plane in the crosshair scene
|
||||
*/
|
||||
var target = new THREE.Vector3(crosshair.position.x, crosshair.position.y, 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.matrixWorld );
|
||||
particle.position.applyMatrix4( mInverse );
|
||||
|
||||
|
||||
|
||||
var particleEngine = GameLib.EntityManager.Instance.findComponentById('w4gg7woov2');
|
||||
var particle = GameLib.EntityManager.Instance.findComponentById('tiqzsk65l0');
|
||||
var crosshair = GameLib.EntityManager.Instance.findComponentById('oxpg88pgzv');
|
||||
|
||||
var flamethrower = GameLib.EntityManager.Instance.findComponentById('01viz3rw6l');
|
||||
var worldCamera = GameLib.EntityManager.Instance.findComponentById('knwkksjc7n');
|
||||
|
||||
var end = new THREE.Vector3(crosshair.position.x, crosshair.position.y, 0);
|
||||
var end = ;
|
||||
|
||||
end.unproject(worldCamera.instance);
|
||||
|
||||
|
|
Loading…
Reference in New Issue