/* Called once when the dummy is first grabbed. Depending on the state of the left glove (overwite or refine), will call the appropriate * functions. */ public void GrabBegin() { if (!isPaused) // If it was playing when grabbed, stop playing and force the play band to pause { StopPlaying(); DMS.PBS_ForceIntoPauseToggleState(); } DMS.UB_ForceIntoUndoToggleState(); if (DMS.LGS_IsInOverwriteState()) { DMS.SFS_AdjustSlider("StartSlider", lastSampleIndex, 0f); // force the start slider to align DMS.AdjustStartAids(lastSampleIndex); lastT = 0f; StartCoroutine(OverwriteNextSample()); } else // Refining { DMS.RGS_StartGuiding(transform.position); } }