Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alians[z][x] = new Object();
- alians[z][x].aBody = new Object();
- alians[z][x].aWing = new Object();
- //generate the alians body
- alians[z][x].aBody.object = new THREE.Mesh(aGeometry, aMaterial);
- alians[z][x].aBody.object.position.set(2*x-10,0,2*z-30);//-3,0,0
- scene.add(alians[z][x].aBody.object);
- //generate the alians wing
- alians[z][x].aWing.object = new THREE.Mesh(aWingGeometry, aWingMaterial);
- alians[z][x].aWing.object.position.set(2*x-10,-1,2*z-30);//-3,-1,0
- scene.add(alians[z][x].aWing.object);
- //give the alian some velocity or at least inishiate the variables
- alians[x][z].velocity = new Object();
- alians[x][z].velocity.x=0.01;
- alians[x][z].velocity.y=0;
- alians[x][z].velocity.z=0;
- //add a bool showing weather the object should be treated as being there or not
- alians[x][z].shown = true;
Advertisement
Add Comment
Please, Sign In to add comment