public bool BeginCapture(Ray ray, UIRayHit hit) { activeWidget = null; // if the hit gameobject has a widget attached to it, begin capture & transformation // TODO maybe wrapper class should have Begin/Update/End capture functions, then we do not need BeginTransformation/EndTransformation ? if (Widgets.ContainsKey(hit.hitGO)) { Widget w = Widgets [hit.hitGO]; if (w.BeginCapture(targetWrapper, ray, hit)) { targetWrapper.BeginTransformation(); activeWidget = w; return(true); } } return(false); }
virtual public bool BeginCapture(InputEvent e) { activeWidget = null; // if the hit gameobject has a widget attached to it, begin capture & transformation // TODO maybe wrapper class should have Begin/Update/End capture functions, then we do not need BeginTransformation/EndTransformation ? if (Widgets.ContainsKey(e.hit.hitGO)) { Standard3DTransformWidget w = Widgets [e.hit.hitGO]; if (w.BeginCapture(targetWrapper, e.ray, e.hit.toUIHit())) { MaterialUtil.SetMaterial(w.RootGameObject, w.HoverMaterial); targetWrapper.BeginTransformation(); activeWidget = w; OnTransformInteractionStart(); return(true); } } return(false); }