public virtual void OnLeave(Controller controller) { /* OnLeave: we are leaving the grabbed object's volume. Change to Color.clear, * which restores the original materials. */ ChangeColor(Color.clear); }
public virtual void OnTriggerDrag(Controller controller) { /* Dragging... */ transform.rotation = controller.rotation * origin_rotation; transform.position = controller.position + transform.rotation * origin_position; }
public virtual void OnEnter(Controller controller) { /* OnEnter: we are entering the grabbed object's volume. Change to highlightColor. */ ChangeColor(highlightColor); }