// this method specifies how to activate the tactile vibrations on the controllers private void activateVibrations() { // find an instance of the CoroutineManager CoroutineManager coroutineManager = FindObjectOfType <CoroutineManager>(); // check the direction specified in Unity switch (direction) { // if the direction is left, make controller2 vibrate // because controller2 is set to be the left controller in Unity // by calling LongVibrationController2 method in CoroutineManager case Direction.Left: { coroutineManager.StartCoroutine(coroutineManager.LongVibrationController2(1, 1)); break; } case Direction.Right: { // if the direction is right, make controller1 vibrate // because controller1 is set to be the right controller in Unity // by calling LongVibrationController1 method in CoroutineManager coroutineManager.StartCoroutine(coroutineManager.LongVibrationController1(1, 1)); break; } case Direction.Straight: { // if the direction is straight, make both controllers vibrate // by calling the LongVibration method in CoroutineManager coroutineManager.StartCoroutine(coroutineManager.LongVibration(1, 1, 1, 1)); break; } case Direction.Around: { // if the direction is turn around, make both controllers vibrate twice // by calling the LongVibration method in CoroutineManager // this direction was only used in the pilot study coroutineManager.StartCoroutine(coroutineManager.LongVibration(2, 1, 1, 1)); break; } } }