public void updateTarget() { if (followTargets && !partySystem.noneSelected()) { GameObject selection = partySystem.getFirstSelectedCharacter(); if (selection != null) { Camera.main.transform.parent = selection.transform; Camera.main.transform.position = new Vector3(Camera.main.transform.parent.position.x, Camera.main.transform.parent.position.y, -5000f); } } else { Camera.main.transform.parent = null; } }