public void MoonCheck() {

		CopyOnWriteArrayList<GameObject> objects = state.getMyObjects();
		for (int j = 0; j < objects.size(); j++) {
			for (int i = 0; i < objects.size(); i++) {

				CollisionResults results = new CollisionResults();
				Vector3f opos = objects.get(j).getPosition();
				Vector3f odir = objects.get(j).getDirection();
				Ray ray = new Ray(opos, odir);
				rootNode.collideWith(ray, results);

				for (int k = 0; k < results.size(); k++) {
					float dist = results.getCollision(k).getDistance();

					if (dist < 2 && objects.get(j).type == "beam") {
						Geometry target = results.getClosestCollision()
								.getGeometry();
						if (target.getName().equals("Moon")) {
							Moon m1 = new Moon(new sharedstate.Planet(objects
									.get(i).getSize() / 2), assetManager, earth);
							Moon m2 = new Moon(new sharedstate.Planet(objects
									.get(i).getSize() / 2), assetManager, earth);
							m1.setRotation();
							m2.setRotation();
							objects.remove(i);
							return;

						}

					}
				}
			}
		}
	}