public void UpdateCursor() { rope = GetComponent <ObiRope>(); m_CursorElement = null; if (rope.isLoaded) { float elmMu; m_CursorElement = rope.GetElementAt(cursorMu, out elmMu); } }
public void UpdateSource() { rope = GetComponent <ObiRope>(); m_SourceIndex = -1; if (rope.isLoaded) { float elmMu; var elm = rope.GetElementAt(sourceMu, out elmMu); if (elm != null && rope.solver != null) { m_SourceIndex = elmMu < 0.5f ? elm.particle1 : elm.particle2; } } }